[JBoss JIRA] (ARQGRA-165) JSInterfaceFactory test case enrichment
by Lukáš Fryč (JIRA)
Lukáš Fryč created ARQGRA-165:
---------------------------------
Summary: JSInterfaceFactory test case enrichment
Key: ARQGRA-165
URL: https://issues.jboss.org/browse/ARQGRA-165
Project: Arquillian Graphene
Issue Type: Enhancement
Affects Versions: 2.0.0.Alpha2
Reporter: Lukáš Fryč
Priority: Minor
For creating Java-to-JavaScript calling interface, you need to use call {{JSInterfaceFactory.create(JavaScriptInterfaceToCreate.class)}}.
This is not really handy for direct usage:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@Test
public void test() throws InterruptedException {
RequestGuard guard = JSInterfaceFactory.create(RequestGuard.class);
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
Let's implement test case enrichment, similarly as we did with @FindBy.
You can re-use annotation @JavaScript:
{code:java}
@RunWith(Arquillian.class)
public class MyTestCase {
@Drone
private WebDriver browser;
@JavaScript
RequestGuard guard;
@Test
public void test() throws InterruptedException {
Assert.assertEquals(RequestType.HTTP, guard.getRequestDone());
}
{code}
This injection should work also in component objects.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (ARQ-837) Managed GlassFish container does not shutdown when a test errors out
by Vineet Reynolds (JIRA)
Vineet Reynolds created ARQ-837:
-----------------------------------
Summary: Managed GlassFish container does not shutdown when a test errors out
Key: ARQ-837
URL: https://issues.jboss.org/browse/ARQ-837
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: GlassFish Containers
Affects Versions: glassfish_1.0.0.CR3
Reporter: Vineet Reynolds
When a test errors out, Arquillian does not invoke the {{DeployableContainer.stop()}} implementation of the managed GlassFish container. The GlassFish container started by Arquillian continues to run, and the subsequent test execution produces the expected error message:
{{quote}}
The server is already running! Managed containers does not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration
{{quote}}
The GlassFish container implementation should incorporate a mechanism similar to the JBoss AS 7 managed container implementation, to execute the {{asadmin stop-domain}} command in a shutdown hook.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month