Yes, with IntelliJ you can set up a scalatest run configuration. You can also 
run directly from the sbt CLI by running “sbt test”


From: Masf <masfwo...@gmail.com<mailto:masfwo...@gmail.com>>
Date: Saturday, December 5, 2015 at 12:51 PM
To: "user@spark.apache.org<mailto:user@spark.apache.org>" 
<user@spark.apache.org<mailto:user@spark.apache.org>>
Subject: Testing with spark testing base

Hi.

I'm testing "spark testing base". For example:

class MyFirstTest extends FunSuite with SharedSparkContext{
  def tokenize(f: RDD[String]) = {
    f.map(_.split("").toList)
  }

  test("really simple transformation"){
    val input = List("hi", "hi miguel", "bye")
    val expected = List(List("hi"), List("hi", "holden"), List("bye"))
    assert(tokenize(sc.parallelize(input)).collect().toList === expected)
  }

}


But...How can I launch this test??
Spark-submit or IntelliJ?

Thanks.

--
Regards
Miguel

Reply via email to