Skip to content

Extend easily your JUnit 4 tests in a modular way. Run concurrent tests (or not...), define easily in many ways your Categories, define statistics about failure or success of your tests...

evialle/OceanRunner

Repository files navigation

OceanRunner

Introduction

A problem, with JUnit is that you CAN’T use multiple interesting Runners for a Test: OceanRunner tries to solve that problem.
By offering an easy way to integrate “RunnersLike” class, named OceanModule, you may conjugate many behaviors of unit testing strategy.

When you can use a single Runner for test, you may use many OceanModules.

More info on the wiki: https://github.com/evialle/OceanRunner/wiki

Built in OceanModules:

  • ArquilianOceanModule: Manager Arquilian tests (not fully developped!)
  • CategoryOceanModule: include or exclude tests based not only on annotations
  • ConcurrentOceanModule: run simultaneously different tests
  • JUnit3AdapterOceanModule: run your JUnit3 tests
  • MockitoOceanModule: Easily use Mockito with your tests
  • OpenEjb30OceanModule: Test easily EJB 3.0
  • ParameterizedOceanModule: test different methods with different parameters
  • RepeatOceanModule: repeat the same test many times to test its consistency
  • SpringOceanModule: test your spring configuration
  • StatisticsOceanModule: process statistics about last success/failure of your test

Creating and using your own OceanModule

Create your OceanModule

Simply create a classe extending it.freshminutes.oceanrunner.modules.engine.OceanModule

Use the OceanModule with your TestClass…

And put at the top of your class to Test:

@RunWith(OceanRunner.class)
@OceanModulesToUse({ MyOwnOceanModule.class, MyOwnOceanModule2.class, MyOwnOceanModule3.class})
public class TestClass {

}

… or define your OceanModule as a default module

Edit your file oceanrunner.properties and set the property: runners.defaultmodules
eg.
runners.defaultmodules=it.freshminutes.oceanrunner.modules.builtin.JUnit3AdapterOceanModule;it.freshminutes.oceanrunner.modules.builtin.CategoryOceanModule

Defining in a new way your TestSuite with OceanSuite

You may put all the class to test in a text file (one line per class, and line starting by # will not be interpreted).

And run it as follow:

@RunWith(OceanSuite.class)
@OceanSuiteClassListFile(“classFileList.txt”)
public class TestOceanSuite {

}

License

Apache License 2.0
Version 2.0, January 2004
http://www.apache.org/licenses/

About

Extend easily your JUnit 4 tests in a modular way. Run concurrent tests (or not...), define easily in many ways your Categories, define statistics about failure or success of your tests...

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages