[forge-users] Problem creating test for a new addon I'm developing

forge-users at lists.jboss.org forge-users at lists.jboss.org
Sun Mar 1 11:50:03 EST 2015


I'm creating a forge addon and following the below folder structure of having seperate addon, impl, tests and api folders. I wrote my Facet implementation in Impl. I'm able to successfully execute the addon. However, I want to create some unit tests to test my addon. I haven't even come to stage of writing tests to my addon. I have followed http://forge.jboss.org/document/test-your-addonhttp://forge.jboss.org/document/test-your-addon and created a sample test. This is what is there in my test
@RunWith(Arquillian.class)
public class FirstTest {
@Deployment
   @Dependencies({
@AddonDependency(name = "org.codehaus.griffon.forge:griffon-forge-addon", version = "1.0.0-SNAPSHOT") })
public static ForgeArchive getDeployment() {
ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
                                                          .addBeansXML()
                                                          .addAsAddonDependencies(AddonDependencyEntry.create("org.codehaus.griffon.forge:griffon-forge-addon", "1.0.0-SNAPSHOT") );
       return archive;
   }

@Test
   public void testSomething() throws Exception {
Assert.fail("Not implemented");
   }
}

When I'm trying to run this test I'm getting the following error.

h5. testSomething(org.codehaus.griffon.forge.FirstTest): Test runner could not locate test class [org.codehaus.griffon.forge.FirstTest] in any deployed Addon.

Can anyone tell me what is the process to be followed when writing tests for our addons if we follow the structure addon, api, impl and tests? Do we have to install the addon to test it? Isn't there any way to test the addon without first installing? Is it possible to test a Facet directly without running through Forge? 

Posted by forums
Original post: https://developer.jboss.org/message/920242#920242



More information about the forge-users mailing list