[JBoss JIRA] (ARQGRA-450) takeBeforeTest does not work when loading of the page is in JUnit @Before method
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-450?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-450:
------------------------------
Fix Version/s: 2.1.0.Alpha1
> takeBeforeTest does not work when loading of the page is in JUnit @Before method
> --------------------------------------------------------------------------------
>
> Key: ARQGRA-450
> URL: https://issues.jboss.org/browse/ARQGRA-450
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: screenshooter
> Affects Versions: 2.1.0.Alpha1
> Reporter: Juraj Húska
> Assignee: Juraj Húska
> Fix For: 2.1.0.Alpha1
>
>
> {{takeBeforeTest}} option is broken, because when there are multiple tests, and the loading of the page is done on {{@Before}} method, then the first test is omitted.
> It is because JUnit @Before observer is called before the Graphene Screenshooter one, thus the registration of interceptor which takes screenshots is done quite late.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1444) Oracle does not support query delimiter inside statements
by Rafael Pestano (JIRA)
[ https://issues.jboss.org/browse/ARQ-1444?page=com.atlassian.jira.plugin.s... ]
Rafael Pestano commented on ARQ-1444:
-------------------------------------
Hi guys,
sorry for bothering you, <extension qualifier="persistence-script">
<property name="sqlDialect">oracle</property>
</extension>
really solves the issue with the delimite.
The clue here is to use TestExecutionPhase.AFTER to see the real error cause after solving the delimiter problem i was receiving a constaint exception and the error was hidden in BEFORE phase.
thanks
> Oracle does not support query delimiter inside statements
> ---------------------------------------------------------
>
> Key: ARQ-1444
> URL: https://issues.jboss.org/browse/ARQ-1444
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6
> Environment: Oracle Database.
> Reporter: Michel Graciano
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.Alpha7
>
>
> When we try to use @ApplyScriptBefore and the script file has more than one statement, we use ; as delimiter. The problem is that the delimiter is not removed from the statement before run it, so Oracle database return the following exception:
> Caused by: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1828) Replace Testrunner with a JUnit-Rule
by Niels Niels (JIRA)
Niels Niels created ARQ-1828:
--------------------------------
Summary: Replace Testrunner with a JUnit-Rule
Key: ARQ-1828
URL: https://issues.jboss.org/browse/ARQ-1828
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Niels Niels
At the moment all tests must run with
@RunWith(Arquillian.class)
This makes trouble if you need a runner with add or remove tests like Parameterized. I can't see what Arquillian.class do which can not be done with a JUnit-Rule. JUnit-Rules can be easily combined.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1827) The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1827?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik commented on ARQ-1827:
--------------------------------------
Method [{{getBundle()}}|https://github.com/arquillian/arquillian-container-osgi/blob/master/testenricher/src/main/java/org/jboss/arquillian/testenricher/osgi/OSGiTestEnricher.java#L64] returns {{null}} when we use annotation {{@RunAsClient}}.
> The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
> ------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1827
> URL: https://issues.jboss.org/browse/ARQ-1827
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Affects Versions: 1.1.0.Final
> Reporter: Martin Swiech
> Assignee: Thomas Diesler
> Priority: Minor
> Labels: client, deployer, osgi, test
>
> The annotation @StartLevelAware(autostart = true) doesn't have effect to start test bundle under Karaf environment in case of @RunAsClient tests.
> I must use property
> <property name="autostartBundle">true</property>
> in arquillian configuration.xml to start test bundle.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1827) The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
by Martin Swiech (JIRA)
[ https://issues.jboss.org/browse/ARQ-1827?page=com.atlassian.jira.plugin.s... ]
Martin Swiech updated ARQ-1827:
-------------------------------
Steps to Reproduce:
1. Create some test bundle to run on Karaf environment.
2. Create @RunAsClient test in this bundle with deployment annotation @StartLevelAware(autostart = true).
3. There could not be property "autostartBundle" in arquillian.xml .
4. Run test using maven
R: Test bundle under karaf is installed, but no activated.
E: Test bundle under karaf is installed and active.
was:
1. Create some test bundle to run on Karaf environment.
2. Create @RunAsClient test in this bundle with deployment annotation @StartLevelAware(autostart = true).
3. arquillian.xml must not has property "autostartBundle"
4. Run test using maven
R: Test bundle under karaf is installed, but no activated.
E: Test bundle under karaf is installed and active.
> The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
> ------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1827
> URL: https://issues.jboss.org/browse/ARQ-1827
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Affects Versions: 1.1.0.Final
> Reporter: Martin Swiech
> Assignee: Thomas Diesler
> Priority: Minor
> Labels: client, deployer, osgi, test
>
> The annotation @StartLevelAware(autostart = true) doesn't have effect to start test bundle under Karaf environment in case of @RunAsClient tests.
> I must use property
> <property name="autostartBundle">true</property>
> in arquillian configuration.xml to start test bundle.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1827) The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
by Martin Swiech (JIRA)
[ https://issues.jboss.org/browse/ARQ-1827?page=com.atlassian.jira.plugin.s... ]
Martin Swiech updated ARQ-1827:
-------------------------------
Labels: client deployer osgi test (was: )
Workaround Description:
Use
<property name="autostartBundle">true</property>
in arquillian.xml
Workaround: Workaround Exists
> The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
> ------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1827
> URL: https://issues.jboss.org/browse/ARQ-1827
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Affects Versions: 1.1.0.Final
> Reporter: Martin Swiech
> Assignee: Thomas Diesler
> Priority: Minor
> Labels: client, deployer, osgi, test
>
> The annotation @StartLevelAware(autostart = true) doesn't have effect to start test bundle under Karaf environment in case of @RunAsClient tests.
> I must use property
> <property name="autostartBundle">true</property>
> in arquillian configuration.xml to start test bundle.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1827) The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
by Martin Swiech (JIRA)
Martin Swiech created ARQ-1827:
----------------------------------
Summary: The @StartLevelAware(autostart = true) does not work with karaf deployer in case of @RunAsClient tests
Key: ARQ-1827
URL: https://issues.jboss.org/browse/ARQ-1827
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: OSGi Containers
Affects Versions: 1.1.0.Final
Reporter: Martin Swiech
Assignee: Thomas Diesler
Priority: Minor
The annotation @StartLevelAware(autostart = true) doesn't have effect to start test bundle under Karaf environment in case of @RunAsClient tests.
I must use property
<property name="autostartBundle">true</property>
in arquillian configuration.xml to start test bundle.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1782) @UsingDataSet/@ShouldMatchDataSet always makes test succeed
by Xavier Lannoye (JIRA)
[ https://issues.jboss.org/browse/ARQ-1782?page=com.atlassian.jira.plugin.s... ]
Xavier Lannoye commented on ARQ-1782:
-------------------------------------
Same issue for me, same solution too (downgrading arq to 1.1.3-FINAL)
> @UsingDataSet/@ShouldMatchDataSet always makes test succeed
> -----------------------------------------------------------
>
> Key: ARQ-1782
> URL: https://issues.jboss.org/browse/ARQ-1782
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha7
> Environment: WildFly 8 CR 2
> Reporter: Nicklas Karlsson
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.next
>
>
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>fi.affecto.marela</groupId>
> <artifactId>arq-concept</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>jar</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <browser>chrome</browser>
> </properties>
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.jboss.arquillian</groupId>
> <artifactId>arquillian-bom</artifactId>
> <version>1.1.4.Final</version>
> <scope>import</scope>
> <type>pom</type>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-drone-bom</artifactId>
> <version>1.3.0.Final</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.selenium</groupId>
> <artifactId>selenium-bom</artifactId>
> <version>2.41.0</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.11</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.junit</groupId>
> <artifactId>arquillian-junit-container</artifactId>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-jpamodelgen</artifactId>
> <version>4.3.5.Final</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.graphene</groupId>
> <artifactId>graphene-webdriver</artifactId>
> <version>2.0.2.Final</version>
> <type>pom</type>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-persistence-core</artifactId>
> <version>1.0.0.Alpha7</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-persistence-dbunit</artifactId>
> <version>1.0.0.Alpha7</version>
> </dependency>
> </dependencies>
> <profiles>
> <profile>
> <id>arq-wildfly</id>
> <dependencies>
> <dependency>
> <groupId>org.jboss.spec</groupId>
> <artifactId>jboss-javaee-7.0</artifactId>
> <version>1.0.0.Final</version>
> <type>pom</type>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.wildfly</groupId>
> <artifactId>wildfly-arquillian-container-remote</artifactId>
> <version>8.1.0.CR2</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.protocol</groupId>
> <artifactId>arquillian-protocol-servlet</artifactId>
> <scope>test</scope>
> </dependency>
> </dependencies>
> </profile>
> </profiles>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.3.2</version>
> <configuration>
> <source>1.7</source>
> <target>1.7</target>
> </configuration>
> </plugin>
> </plugins>
> <testResources>
> <testResource>
> <directory>src/test/resources</directory>
> <filtering>true</filtering>
> </testResource>
> </testResources>
> </build>
> </project>
> {code}
> {code:java}
> package fi.affecto.marela.test;
> import javax.inject.Inject;
> import javax.persistence.EntityManager;
> import javax.persistence.PersistenceContext;
> import javax.transaction.UserTransaction;
> import org.jboss.arquillian.container.test.api.Deployment;
> import org.jboss.arquillian.junit.Arquillian;
> import org.jboss.arquillian.persistence.ShouldMatchDataSet;
> import org.jboss.arquillian.persistence.UsingDataSet;
> import org.jboss.arquillian.transaction.api.annotation.Transactional;
> import org.jboss.shrinkwrap.api.Archive;
> import org.jboss.shrinkwrap.api.ShrinkWrap;
> import org.jboss.shrinkwrap.api.asset.EmptyAsset;
> import org.jboss.shrinkwrap.api.spec.WebArchive;
> import org.junit.Assert;
> import org.junit.Test;
> import org.junit.runner.RunWith;
> import fi.affecto.marela.jpa.Game;
> @RunWith(Arquillian.class)
> public class PersistenceExtensionTest
> {
> @Deployment
> public static Archive<?> createDeployment()
> {
> return ShrinkWrap.create(WebArchive.class, "test.war").addPackage(Game.class.getPackage())
> .addAsResource("persistence.xml", "META-INF/persistence.xml")
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @PersistenceContext
> EntityManager em;
> @Inject
> UserTransaction utx;
> @Test
> public void testA() throws Exception
> {
> Assert.assertNotNull(em);
> utx.begin();
> // em.joinTransaction();
> Game g = new Game();
> g.setId(666L);
> g.setTitle("x");
> Assert.assertFalse(em.contains(g));
> g = em.merge(g);
> Assert.assertTrue(em.contains(g));
> utx.rollback();
> }
>
> @Test
> @Transactional
> public void testB() throws Exception
> {
> Assert.assertNotNull(em);
> Game g = new Game();
> g.setId(666L);
> g.setTitle("x");
> Assert.assertFalse(em.contains(g));
> g = em.merge(g);
> Assert.assertTrue(em.contains(g));
> }
> @Test
> // @UsingDataSet("games.yml")
> // @ShouldMatchDataSet("games-check.yml")
> @Transactional
> public void testC() throws Exception
> {
> Assert.assertTrue(false);
> }
> }
> {code}
> testC succeeds if the annotations are uncommented.
> Furthermore, there is something strange with the em/transactions, the persistence works even if the em doesn't join the transaction and the em complains of a detached instance if merge() is switched for persist()
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-455:
-----------------------------------
[~jhuska] I don't think there is any workaround, you can avoud using guards for this tests for now.
The resolution means we stick with the specification / implementations out there. By debugging you can reveal from where the {{e}} (event) parameter comes and how it is treated.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Oliver Kišš (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Oliver Kišš commented on ARQGRA-455:
------------------------------------
[~lfryc] sure
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months