git clone https://github.com/mumuki/mumuki-junit-runner
cd mumuki-junit-server
rbenv install 2.0.0-p481
rbenv rehash
gem install bundler
This runner is dockerized, so you will need to install Docker first. Then:
./bin/pull_docker.sh
bundle install
RACK_ENV=development bundle exec rackup -p 4567
Tests are standard JUnit 4 tests, with a few following considerations:
You don't have to code the Test Class, but only the test methods instead. E.g.:
@Test
public void testFoo() {
Assert.assertEquals(Foo.bar(), 2);
}
The following packages are imported by default:
java.util.*
java.util.function.*
java.util.stream.*
java.util.stream.Collectors.*
java.time.*
There are no specific test naming conventions. However, using snake_case
instead of camelCase
is recommended, since underscores _
will be converted into spaces in the test title. E.g.:
@Test
// WARNING:This test title will be reported as "test something interesting"
// instead of just "test_something_interesting"
public void test_something_interesting() {
Assert.assertEquals(Foo.bar(), 2);
}