Antonio Goncalves created FORGEPLUGINS-194:
----------------------------------------------
Summary: Being able to create an Arquillian test as a client
Key: FORGEPLUGINS-194
URL:
https://issues.jboss.org/browse/FORGEPLUGINS-194
Project: Forge Plugins/Addons
Issue Type: Feature Request
Components: Arquillian Plugin
Reporter: Antonio Goncalves
Assignee: Aslak Knutsen
It would be good to be able to create client tests with Arquillian. At the moment, to test
a REST endpoint we get the following :
{code}
arquillian-create-test --targets CategoryEndpoint
@RunWith(Arquillian.class)
public class CategoryEndpointTest
{
@Inject
private CategoryEndpoint categoryendpoint;
@Deployment
public static JavaArchive createDeployment()
{
return ShrinkWrap.create(JavaArchive.class)
.addClass(CategoryEndpoint.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Test
public void should_be_deployed()
{
Assert.assertNotNull(categoryendpoint);
}
}
{code}
But what would be nice is to have a {{runAsWebClient}} parameter that would create a test
case with an {{ArquillianResource}} and a {{RunAsClient}} such as :
{code}
@RunWith(Arquillian.class)
@RunAsClient
public class CategoryEndpointTest
{
@ArquillianResource
private URI baseURL;
@Deployment(testable = false)
public static WebArchive createDeployment()
{
return ShrinkWrap.create(WebArchive.class)
.addClass(CategoryEndpoint.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Test
public void should_be_deployed()
{
Assert.assertNotNull(baseURL);
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)