Skip to content

This repository contains a collection of tests organized by technology that showcase Arquillian's capabilities.

Notifications You must be signed in to change notification settings

albers/arquillian-showcase

 
 

Repository files navigation

Problems using Arquillian Warp with Rewrite

This repository is a fork of the Arquillian Showcase. Its rewrite branch illustrates problems I faced when using OCPsoft's URL-Rewriting Framework rewrite with Arquillian Warp.

Changes made

  1. updated some dependencies in arquillian-showcase-parent to current versions (Arquillian Warp 1.0.0.Alpha5)
  2. added a rewrite configuration and a failing test to the arquillian-showcase-warp project

See git changelog for details.

arquillian-showcase-warp

arquillian-showcase-warp contains two simple JSF applications and a Warp test case for each one of them.

I added RewriteConfigurationProvider which introduces an URI alias "/index" for the JSF page "index.xhtml". In BasicJSFUnitTestCase, I added a copy of the existing Warp test. Now, there are two warp test performing the same task, one using the original URI and one the aliased one.

Webapp demonstration

To see the URI alias in action,

Warp demonstration

  • Make sure no local JBoss server is running.
  • cd to the warp directory
  • Run mvn test

expected result

all tests pass.

actual result

BasicJSFUnitTestCase.shouldExecutePage_usingUrlAlias() fails with ClientWarpExecutionException: deenriching response failed: The response payload with serialId [...] was never registered

conclusion

The Warp test using the unaliased URI passes as expected. But when Rewrite rewrites a request, the corresponding Warp test fails.

I'm not sure whether this is an rewrite or Warp issue. Any help on how to combine these two technologies would be greatly appreciated.

About

This repository contains a collection of tests organized by technology that showcase Arquillian's capabilities.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.3%
  • Groovy 0.7%