Skip to content

Executing scala tests #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
orrsella opened this issue Oct 12, 2015 · 2 comments
Closed

Executing scala tests #503

orrsella opened this issue Oct 12, 2015 · 2 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request

Comments

@orrsella
Copy link

Any existing workaround to use java_test for executing scala tests (similar to #443), or is there a different approach to substitute the lack of scala_test for now? Scala test classes usually use org.junit.runner.RunWith and a custom JUnitRunner to execute (like this one for specs2).

Simple example:

package com.example

import org.junit.runner.RunWith
import org.specs2.mutable.Specification
import org.specs2.runner.JUnitRunner

@RunWith(classOf[JUnitRunner])
class HelloWorldTest extends Specification {

  "HelloWorld" should {
    "have the correct message" in {
      HelloWorld.message must_== "Hello world!"
    }
  }
}
@hanwen
Copy link
Contributor

hanwen commented Oct 13, 2015

you could create a scala_test that expands into java_test that imports the jar generated by scala_binary?

@palladius
Copy link

Added this issue as b/25141720.

@damienmg damienmg added type: feature request P3 We're not considering working on this, but happy to review a PR. (No assignee) scala labels Nov 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants