Coder Social home page Coder Social logo

junit-easy-tools's Issues

Add feature to repeat tests that runs with JUnitDataProducer

Some annotation on the test method should make the test repeat it's execution as many time as is set it annotation parameter. Value injected to the test should be recalculate each time.
Example:

@Test
@Repeat(3)
public void testMethod(int i){
   ...
}

Bug with iterating tests run when more that one DataProducers satisfy the type

Looks like if we have two data producers of the same type, when using iteration over the tests method, only one DataProducer is used

the following code fails

    private static final Queue<String> valuesWithNulls = new LinkedList<>();

    @DataProducer
    public static Supplier<String> producerWithNulls = valuesWithNulls::poll;

    @DataProducer
    public static Supplier<String> onlyNullSupplier = () -> null;

    @Before
    public void fillValues() throws Exception {
        valuesWithNulls.add("firstString");
        valuesWithNulls.add(null);
        valuesWithNulls.add("thirdOne");
        valuesWithNulls.add(null);
    }

    @Test
    @ProducedValues(nullsAccepted = false, iterations = 4)
    public void shouldNotAcceptNulls(String value) throws Exception {
        assertThat(value).isNotNull();
    }

Fix zappr config

For now zappr config matches uppercase letter with dash and letter
Fix to match: word #[digits]

Extend documentation

  • Multiple @DataProducer of the same type:
@DataProducer
public static Supplier<String> first = () -> "first";

@DataProducer
public static Supplier<String> second = () -> "second";

@Test
//@ProducerValues(iterations = 2) -> in this case test method will be executed 4 time (2 times for each supplier)
public void test(String s) {
    //Will be executed twice with both provided value from first and second suppliers
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.