2 Replies Latest reply on Mar 31, 2012 3:08 AM by Takayuki Konishi

    How to test a WAR that redirects all GET request?

    Takayuki Konishi Newbie

      Hi forks,


      I'm trying to test OpemAM with Arquillian in EAP 5.1.2 just out of interest.

      Test code: [1]


      The problem is OpemAM seem to redirect all request, so arquillian test request [2] is redirected [3] and the test turns to error.

      When I modified web.xml of OpenAM, the test is succeeded but I don't think modifying one of test target is a good way.


      This test is just out of interest but would be important when adopting Arquillian to existing project.

      How should I avoid the redirect?


      Attached file: this test project except for openam_954.war.




      public class EmailValidatorTest {
          public static WebArchive createDeployment() {
              return ShrinkWrap.create(ZipImporter.class, "openam_954_test.war")
                      .importFrom(new File("sample/openam_954.war"))
          public void validateShouldValidateAddress() throws Exception {
              EmailValidator ev = new EmailValidator();



      GET /openam_954_test/ArquillianServletRunner?outputMode=serializedObject&className=org.arquillian.example.EmailValidatorTest&methodName=validateShouldValidateAddress



      302 Moved Temporarily