Arquillian Core 1.2.0.Final Released
Since we wrote this post we didn't laze around. Check our latest announcement.
The Arquillian team is proud to announce the 1.2.0.Final release of the Arquillian Core component!
Welcome JUnit Rules for Arquillian
Just before Christmas holidays we are extremely excited to ship long awaited feature for JUnit integration. If you want to use Arquillian Testing Platform with other JUnit Runner, you can now use JUnit Rules – ArquillianTestClass
and ArquillianTest
– and happily let Arquillian do the heavy lifting for your tests. Hats off to Alexander Schwartz for providing initial implementation.
To get the similar functionality what the @RunWith(Arquillian.class)
is offering you should require both rules i.e. ArquillianTestClass
and ArquillianTest
.
@ClassRule public static ArquillianTestClass arquillianTestClass = new ArquillianTestClass();
@Rule public ArquillianTest arquillianTest = new ArquillianTest();
@Deployment public static JavaArchive createDeployment() { return ShrinkWrap.create(JavaArchive.class) .addClass(Greeter.class) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); }
@Inject Greeter greeter;
@Test public void should_greet_earthlings() throws Exception { String name = "Earthlings"; Assert.assertEquals("Hello, " + name, greeter.greet(name)); }
In order to use any other JUnit Class or Method Rule with ArquillianClassTest
or ArquillianTest
rule, you have to use it with RuleChain
having arquillian rules defined as outer rules.. e.g.
@Rule
public MethodRule testWatchman = MethodRuleChain.outer(new ArquillianTest().around(new TestWatchman());
There is no chain for method rules out of the box provided by JUnit so we have our own and you can use it if you need.
If you would like to see it in action, take a look at following examples
What is Arquillian?
Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.
Release details
Component | Arquillian Core |
---|---|
Version | 1.2.0.Final view tag |
Release date | 2017-12-20 |
Released by | Bartosz Majsak |
Compiled against |
Published artifacts org.jboss.arquillian.core
- org.jboss.arquillian.core » arquillian-core-api jar javadoc pom
- org.jboss.arquillian.core » arquillian-core-spi jar javadoc pom
- org.jboss.arquillian.core » arquillian-core-impl-base jar javadoc pom
- org.jboss.arquillian.config » arquillian-config-api jar javadoc pom
- org.jboss.arquillian.config » arquillian-config-spi jar javadoc pom
- org.jboss.arquillian.config » arquillian-config-impl-base jar javadoc pom
- org.jboss.arquillian.test » arquillian-test-api jar javadoc pom
- org.jboss.arquillian.test » arquillian-test-spi jar javadoc pom
- org.jboss.arquillian.test » arquillian-test-impl-base jar javadoc pom
- org.jboss.arquillian.container » arquillian-container-spi jar javadoc pom
- org.jboss.arquillian.container » arquillian-container-impl-base jar javadoc pom
- org.jboss.arquillian.container » arquillian-container-test-api jar javadoc pom
- org.jboss.arquillian.container » arquillian-container-test-spi jar javadoc pom
- org.jboss.arquillian.container » arquillian-container-test-impl-base jar javadoc pom
- org.jboss.arquillian.junit » arquillian-junit-core jar javadoc pom
- org.jboss.arquillian.junit » arquillian-junit-standalone jar javadoc pom
- org.jboss.arquillian.junit » arquillian-junit-container jar javadoc pom
- org.jboss.arquillian.testng » arquillian-testng-core jar javadoc pom
- org.jboss.arquillian.testng » arquillian-testng-standalone jar javadoc pom
- org.jboss.arquillian.testng » arquillian-testng-container jar javadoc pom
- org.jboss.arquillian.testenricher » arquillian-testenricher-cdi jar javadoc pom
- org.jboss.arquillian.testenricher » arquillian-testenricher-ejb jar javadoc pom
- org.jboss.arquillian.testenricher » arquillian-testenricher-resource jar javadoc pom
- org.jboss.arquillian.testenricher » arquillian-testenricher-initialcontext jar javadoc pom
- org.jboss.arquillian.protocol » arquillian-protocol-servlet jar javadoc pom
- org.jboss.arquillian.protocol » arquillian-protocol-jmx jar javadoc pom
- org.jboss.arquillian » arquillian-bom pom
Release notes and resolved issues 1
- Feature Request
-
- ARQ-1828 - Replace Testrunner with a JUnit-Rule
Thanks to the following list of contributors: Bartosz Majsak, Dipak Pawar, Alexander Schwartz