[JBoss JIRA] (ARQGRA-213) print contextpath and option to sleep after starting the @Deployment
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-213?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-213:
-----------------------------------
Mark, for printing context-path, you can use either
* {{@Before}} execution printing {{contextPath}}
* Arquillian mini-extension to achieve that
In order to pause execution, I would use debug point on the start of the test.
> print contextpath and option to sleep after starting the @Deployment
> --------------------------------------------------------------------
>
> Key: ARQGRA-213
> URL: https://issues.jboss.org/browse/ARQGRA-213
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Mark Struberg
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha3
>
>
> Most graphene unit test have a @Deployment section and something similar to the following:
> {code}
> @ArquillianResource
> private URL contextPath;
> {code}
> When debugging the Server for finding the bug in the webapp it's often needed to manually click through the application and invoke requests directly. But to do that you need the contextpath! It would be nice if Arquillian Graphene would log this information.
> Another highly useful feature would be to stop the test after a @Deployment via a -D java option. Currently I need to add a Thread.sleep(600000L) to my test manually if I like to test the server. If I don't do that Selenium aborts the test with a failure after 30s if I'm debugging the server.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQGRA-213) print contextpath and option to sleep after starting the @Deployment
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-213?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-213:
------------------------------
Fix Version/s: 2.0-Tracking
(was: 2.0.0.Alpha3)
> print contextpath and option to sleep after starting the @Deployment
> --------------------------------------------------------------------
>
> Key: ARQGRA-213
> URL: https://issues.jboss.org/browse/ARQGRA-213
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Mark Struberg
> Assignee: Lukáš Fryč
> Fix For: 2.0-Tracking
>
>
> Most graphene unit test have a @Deployment section and something similar to the following:
> {code}
> @ArquillianResource
> private URL contextPath;
> {code}
> When debugging the Server for finding the bug in the webapp it's often needed to manually click through the application and invoke requests directly. But to do that you need the contextpath! It would be nice if Arquillian Graphene would log this information.
> Another highly useful feature would be to stop the test after a @Deployment via a -D java option. Currently I need to add a Thread.sleep(600000L) to my test manually if I like to test the server. If I don't do that Selenium aborts the test with a failure after 30s if I'm debugging the server.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1258) Allow Chrome switches to contain spaces
by Karel Piwko (JIRA)
Karel Piwko created ARQ-1258:
--------------------------------
Summary: Allow Chrome switches to contain spaces
Key: ARQ-1258
URL: https://issues.jboss.org/browse/ARQ-1258
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Drone
Affects Versions: drone_1.1.0.Final
Reporter: Karel Piwko
Assignee: Tomas Repel
Fix For: drone_1.2.0.next
Current chrome switches does not allow spaces at all.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1255) Multiple deployments is not working in Weld SE container
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1255?page=com.atlassian.jira.plugin.s... ]
Karel Piwko commented on ARQ-1255:
----------------------------------
I think this is not Weld SE related. The problem is that @Inject annotation does not know where to inject from, as there are multiple deployment. This has no general solution, as there might be for instance classes implementing same EJB with different content in each of the @Deployment.
Does following work? There the injector should have enough content:
{code}
@Test
@OperateOnDeployment("beans-jar")
public void singleDeploymentTest(@Inject Bean1 bean, @Inject Bean2 bean2) {
assertNotNull(bean1);
assertNotNull(bean2);
}
{code}
> Multiple deployments is not working in Weld SE container
> --------------------------------------------------------
>
> Key: ARQ-1255
> URL: https://issues.jboss.org/browse/ARQ-1255
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Weld Containers
> Affects Versions: 1.0.0.CR5
> Reporter: Antonin Stefanutti
> Attachments: Bean1.java, Bean2.java, MultipleDeploymentArquilianCdiTest.java, OperateOnDeploymentArquilianCdiTest.java, pom.xml, test_case_1_stacktrace.txt, test_case_2_stacktrace.txt
>
>
> As described in [Multiple Deployments|https://docs.jboss.org/author/display/ARQ/Multiple+Deployments], multiple {{@Deployment}} annotated methods can be declared in a test class. In addition, the {{@OperateOnDeployment}} annotation enables the selection of a particular _deployment_ per test method.
> However, when using Arquillian with a Weld SE container, the CDI container isn't deployed with the expected archives which ends up having {{DeploymentException}} thrown, as illustrated in the test cases below:
> *Test case 1:*
> {code}
> @RunWith(Arquillian.class)
> public class MultipleDeploymentArquilianCdiTest {
> @Inject
> private Bean1 bean1;
> @Inject
> private Bean2 bean2;
> @Deployment(name = "bean1-jar")
> public static Archive<?> createBean1Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean2-jar")
> public static Archive<?> createBean2Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Test
> public void multiDeploymentTest() {
> assertNotNull(bean1);
> assertNotNull(bean2);
> }
> }
> {code}
> *Test case 2:*
> {code}
> @RunWith(Arquillian.class)
> public class OperateOnDeploymentArquilianCdiTest {
> @Inject
> private Bean1 bean1;
> @Inject
> private Bean2 bean2;
> @Deployment(name = "beans-jar")
> public static Archive<?> createBeansJar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean1-jar")
> public static Archive<?> createBean1Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean1.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Deployment(name = "bean2-jar")
> public static Archive<?> createBean2Jar() {
> return ShrinkWrap.create(JavaArchive.class).addClass(Bean2.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @Test
> @OperateOnDeployment("beans-jar")
> public void singleDeploymentTest() {
> assertNotNull(bean1);
> assertNotNull(bean2);
> }
> }
> {code}
> In both cases, the following exception is thrown:
> {code}
> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bean2] with qualifiers [@Default] at injection point [[field] @Inject private arquillian.test.OperateOnDeploymentArquilianCdiTest.bean2]
> {code}
> Note that test case 2 is working when only {{@Deployment(name = "beans-jar")}} is declared.
> Test classes and the {{pom.xml}} are attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-952) Avoid heavy-weight tests for Drone functional testing
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-952?page=com.atlassian.jira.plugin.sy... ]
Karel Piwko updated ARQ-952:
----------------------------
Fix Version/s: drone_1.1.1.Final
> Avoid heavy-weight tests for Drone functional testing
> -----------------------------------------------------
>
> Key: ARQ-952
> URL: https://issues.jboss.org/browse/ARQ-952
> Project: Arquillian
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Extension - Drone
> Reporter: Lukáš Fryč
> Assignee: Karel Piwko
> Fix For: drone_1.2.0.next, drone_1.1.1.Final
>
>
> Drone uses {{weld-login}} deployment as the sample of tests.
> It should be rather tested as stand-alone, but then we might miss problems with cooperation with deployment phase.
> ----
> I suggest to rewrite current test to use light-weight deployment (simple HTML page)
> and additionally add standalone tests to test suite.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1251) Arquillian Drone is unable to instantiate Firefox driver if acceptSslCerts, webStorageEnabled, loggingPrefs properties are used in arquillian.xml
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1251?page=com.atlassian.jira.plugin.s... ]
Karel Piwko updated ARQ-1251:
-----------------------------
Fix Version/s: drone_1.2.0.next
drone_1.1.1.Final
> Arquillian Drone is unable to instantiate Firefox driver if acceptSslCerts, webStorageEnabled, loggingPrefs properties are used in arquillian.xml
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1251
> URL: https://issues.jboss.org/browse/ARQ-1251
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Drone
> Affects Versions: drone_1.1.0.Final
> Reporter: Tomas Repel
> Assignee: Karel Piwko
> Fix For: drone_1.2.0.next, drone_1.1.1.Final
>
>
> Description of problem:
> If you set these properties via arquillian.xml, the Drone fails to instantiate the Firefox driver. The problem is during creation of org.openqa.selenium.firefox.FirefoxDriver instance, these properties are cast from String to e.g. Boolean (in case of acceptSslCerts) resulting in ClassCastException.
> Snippet of arquillian.xml:
> {code:xml}
> <extension qualifier="webdriver">
> <property name="acceptSslCerts">false</property>
> <property name="webStorageEnabled">false</property>
> <property name="loggingPrefs">someLoggingPrefs</property>
> </extension>
> {code}
> Snippet of Firefox driver injection that fails:
> {code}
> @Drone
> FirefoxDriver browser;
> {code}
> Version-Release number of selected component (if applicable):
> Arquillian 1.0.3.Final
> Arquillian Drone extension 1.1.0.Final
> Selenium 2.27.0 (WebDriver 2)
> How reproducible:
> Always.
> Steps to Reproduce:
> 1. launch functional test using code snippets above
>
> Actual results:
> {noformat}
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
> at org.openqa.selenium.firefox.FirefoxDriver.populateProfile(FirefoxDriver.java:148)
> at org.openqa.selenium.firefox.FirefoxDriver.extractProfile(FirefoxDriver.java:133)
> at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at org.jboss.arquillian.drone.webdriver.factory.SecurityActions.newInstance(SecurityActions.java:142)
> ... 50 more
> {noformat}
> Expected results:
> It launches Firefox browser.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years