Re: [sbt] Creating a testing framework that work with sbt.

85 views
Skip to first unread message

Stefan Zeiger

unread,
Sep 7, 2012, 9:13:04 AM9/7/12
to simple-b...@googlegroups.com
On 2012-08-30 17:28, James Lowry wrote:
I'm currently working on a sbt plugin that wraps qunit and will enable us to run javascript unit tests as part of the sbt build.

I've:
  • Implemented the interfaces at org.scalatools.testing : Framework, AnnotationFingerPrint, and Runner2.
  • implemented an annotation in java with  runtime and target type.
  • Ran sbt publish-local
  • Created a new sbt project and added my plugin to project/plugins.sbt and also imported the dependency for the annotation.
  • create a class annotation with the annotation (when has)
  • ran sbt test
How ever I don't get any feed back from the event that I even though it hardcoded in.
I there an extra step that I am missing?

Test-interface implementations are not packaged as sbt plugins. Instead you need to add them as a test dependency and (unless it's one of the standard implementations known by sbt), add it to testFrameworks:

libraryDependencies
+= "com.example" % "my-interface" % "0.1" % "test"

testFrameworks += new TestFramework("com.example.MyInterface")

Doug Tangren

unread,
Sep 7, 2012, 9:25:06 AM9/7/12
to simple-b...@googlegroups.com
Awesome work on this. I love seeing sbt being used more broadly that is original intended use case. Also, I probably not unlike most others work in a company with mixed technology stack. Testing tools like the one you are building really help in company adoption.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Reply all
Reply to author
Forward
0 new messages