Has anyone tried Jnario with Arquillian test framework?

Skip to first unread message

Mahlatse Makalancheche

Apr 24, 2014, 3:04:20 AM4/24/14
to jna...@googlegroups.com
Hi All,

I just saw Jnario yesterday while i was reluctantly struggling to find an eclipse plugin for Jbehave on the eclipse market, it's a real beauty and seems to just bring about "sheer development(driving) pleasure" to java.

I'm busy with a JavaEE project, and i would like to run my tests in Arquillian which would allow me run my acceptance/integration test (these would be my Features in Jnario) in a real server with all dependency injection i get from standard JavaEE. I'm new to both projects but i figure i would need to create some SpecCreator that would support Arquillian, problem is i have no idea how to link the projects, anyone got an idea?

Basic example of a Arquillian test taken from their website:

package org.arquillian.example;

import javax.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.Assert;
import org.junit.runner.RunWith;

public class GreeterTest {

    @Deployment  //Arquillian specific
    public static JavaArchive createDeployment() {
        return ShrinkWrap.create(JavaArchive.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");

    @Inject  //JavaEE specific
    Greeter greeter;

    public void should_create_greeting() {
        Assert.assertEquals("Hello, Earthling!",
        greeter.greet(System.out, "Earthling");

Sebastian Benz

Apr 25, 2014, 9:26:48 AM4/25/14
to jna...@googlegroups.com

jnario uses it's own test runner which makes it hard to use another test runner at the same time. But you can customise the spec creation process using a custom SpecInstantiator (http://jnario.org/org/jnario/spec/tests/integration/CustomizingTheSpecCreationSpec.html). You could try to implement the required Arquillian setup logic in there.

Hope that helps,


You received this message because you are subscribed to the Google Groups "Jnario" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jnario+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
0 new messages