Tag Archives: rule

Rule Them All meets PhantomJS to test JAX-RS javascript client generation


HTMLUnit is great to test web applications but sadly it doesn’t support recent js libraries (AngularJs/JQuery to not say their names).

PhantomJs is a great alternative but sometimes setup can be boring or too complicated for what you need.

Continue reading

Advertisements

EJBContainer and JUnit rules, no more need of any Runner! Thanks OpenEJB!


If you read this post you surely know some “common” ways to test EE applications with JUnit using a runner. It often looks like:

@RunWith(CdiTestRunner.class)
public class MyEETestWithDeltaSpike {
    @Inject
    private ACdiBean bean;

    @Test
    public void theTest() {
        // do test
    }
}

or

@RunWith(EJBContainerRunner.class)
public class MyEETestWithOneOpenEJB {
    @Inject
    private ACdiBean bean;

    @Test
    public void theTest() {
        // do test
    }
}

These tests have something in common: they use the classpath to deploy and don’t need something else (compared to Arquillian or ApplicationComposer).

That’s great but you bind your test lifecycle to the specific runner. It means you can’t compose runners and you can’t do anything before the container bootstrap like starting a FTP server with rule-them-all or just using JUnit Theories or Parameterized runners.

Continue reading