- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Using the Scala IDE for Eclipse with JUnit
Created by Anonymous on 2008-12-10.
Updated: 2009-05-18, 14:31
Using JUnit4
- Go to the properties dialog of your project
- Go to the Java Build Path->Libraries tab and add an external class folder. Choose the bin folder of your project.
- Go to the Order and Export tab and move your new class path entry to the top or at least above your source folder(s).
- Add JUnit4 to the build path of your project if you haven't already.
The Eclipse JUnit runner should find your tests now, but only if you explicitly specify a test class in the launch configuration. Suppose you have a project junit4-test with a test class:
package a import org.junit._ import Assert._ class Tests { @Test def sample() { assertEquals(42, 6*7) } }
Your launch dialog should look like the following:
JUnit 4 launch configuration
