Run RestAssured tests on 'sbt test'

48 views
Skip to first unread message

Rashmi Ingle

unread,
Jan 31, 2024, 2:01:06 AMJan 31
to REST assured
Hello,
    How can I configure my build.sbt such that on 'sbt test', the tests under test/restassured/src/test/scala run similar to unit tests in Scala?
Right now when I run sbt test within test/restassured/src/test/scala no tests are run.
The build.sbt looks like:

ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
  .settings(
    // Project metadata
    name := "restassured",
    idePackagePrefix := Some("com.thinktilt.proforma"),

    // Dependencies
    libraryDependencies ++= Seq(
      // REST Assured for API testing
      "io.rest-assured" % "rest-assured" % "4.4.0",

      // JSON handling
      "org.json" % "json" % "20231013",
      "com.typesafe.play" %% "play-json" % "2.10.2",

      // JSON schema validation
      "io.rest-assured" % "json-schema-validator" % "4.4.0",
      "com.jayway.jsonpath" % "json-path" % "2.6.0",

      // HTTP client
      "com.squareup.okhttp3" % "okhttp" % "4.9.1",

      // Testing frameworks
      "org.junit.jupiter" % "junit-jupiter-api" % "5.8.1" % Test,
      "org.scalatest" %% "scalatest" % "3.2.10" % Test
    ),

    // Test configurations
    testFrameworks += new TestFramework("org.scalatest.tools.Framework"),
    Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oD")
  )

Michael Pinnegar

unread,
Jan 31, 2024, 4:30:45 PMJan 31
to rest-a...@googlegroups.com
This isn't the right format for this kind of question. You should ask on Stackoverflow, or a mailing list for SBT. This is a place for asking questions about rest-assured.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rest-assured/9242a3e3-0c6e-4c6b-8fe2-7c742c4b5fa9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages