Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-118

When Creating an Arquillian test and the class file select requires any web-only features the Test.java class should create a WebArchive rather than a JavaArchive.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 1.0.0.Beta3
    • None

      End result of the created arquillian test class should have Deployment method as follows:
      @Deployment public static WebArchive createDeployment()

      { return ShrinkWrap.create(WebArchive.class, "test.war") .addPackage(<ClassBeingTested>.class.getPackage()) //To ensure all necessary classes are added .addAsResource("META-INF/persistence.xml") //If this file exists .addAsWebResource(new StringAsset("<beans/>"), ArchivePaths.create("WEB-INF/beans.xml")); }

      Currently when running:
      arquillian create-test --class MyClass.java

      An Arquillian test is created, but as a JavaArchive which is not correct.

            paulbakker_jira Paul Bakker (Inactive)
            css181 Craig Schwarzwald (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: