Giter Site home page Giter Site logo

arquillian / arquillian-core Goto Github PK

View Code? Open in Web Editor NEW
368.0 368.0 196.0 5.82 MB

Arquillian provides a component model for integration tests, which includes dependency injection and container life cycle management. Instead of managing a runtime in your test, Arquillian brings your test to the runtime.

Home Page: http://arquillian.org

License: Apache License 2.0

Java 100.00%
integration-testing java jvm test-automation testing

arquillian-core's People

Contributors

alrubinger avatar andygibson avatar aslakknutsen avatar bartoszmajsak avatar chengfang avatar dependabot-preview[bot] avatar dependabot[bot] avatar dipak-pawar avatar drallen avatar gastaldi avatar gpoul avatar hemanik avatar jamezp avatar jhanders34 avatar jottinger avatar kpiwko avatar lordofthejars avatar lprimak avatar manovotn avatar matousjobanek avatar mgencur avatar mojavelinux avatar nickarls avatar pmuir avatar rhusar avatar robertpanzer avatar starksm64 avatar tommysdk avatar wolfganghg avatar zlika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arquillian-core's Issues

Hierarchy Lookup for Expression Resolver

Problem:

Currently we have StringPropertyReplacer to resolve expression ${p}.

I am running my tests with failsafe configuration like

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-failsafe-plugin</artifactId>
    <configuration>
       <systemPropertyVariables>
         <APP_NAME>${project.artifactId}</APP_NAME>
       </systemPropertyVariables>
     </configuration>
</plugin>

If I am using expression language to resolve ${APP_NAME} , I will use

 @RouteURL("${APP_NAME}")
 private URL baseURL;

It works fine from mvn build. But if I tries to run if from IDE(che), it doesn't resolve this property which is fine becuase we don't have system property or env variable set. But even if I set env variable by name APP_NAME, it won't resolve it because during test execution core will set all env vars to system properties by prefixing it with env., which mean APP_NAME env variable will be available in system properties by name env.APP_NAME.

To make it workable I have to change code to following

 @RouteURL("${env.APP_NAME}")
 private URL baseURL;

Proposed Solution:

It'll be good if we provide some hierarchy for lookup `System.getProperty(APP_NAME) - > System.getenv(APP_NAME) -> System.getProperty("env.APP_NAME"), so user can easily use same code for both the cases(through system property and env var)

 @RouteURL("${APP_NAME}")
 private URL baseURL;

testng 6.9.12+

hi
any plan for update testng to 6.9.12 or major?
thanks in advance
regards

Using a timeout with testng breaks everything

Issue Overview

If you add a timeout to a testng test using org.jboss.arquillian.testng.Arquillian, everything breaks.

Expected Behaviour

Adding a timeout shouldn't break stuff.

Current Behaviour

It breaks, and it breaks in a very non-obvious manner.

Steps To Reproduce
  1. Change @Test to @Test(timeOut=1000) on the test ArquillianClass1
  2. Run the test
Additional Information

Tested with testng 6.13.1, but the problem is with arquillian. It runs @BeforeSuite in a different thread to the test itself. @BeforeSuite sets up a thread local context object (TestRunnerAdapter), so when the test runs, it doesn't find this object, and everything goes to hell.

running deploymentExportExploded= true after deploymentExportExploded = false or vice versa without mvn clean throws illegal argument exception

Bug report

Issue Overview

"Cannot export a stream file to existing directory" after deploymentExportExploded property change.

Expected Behaviour
same as when property not changed.

Current Behaviour
java.lang.IllegalArgumentException: Cannot export a stream file to existing directory: ...

Steps To Reproduce

  1. Run test with deploymentExportExploded= true
  2. change deploymentExportExploded to false then run test again.
Apache Maven 3.5.0 Java version: 1.8.0_151, vendor: Oracle Corporation Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.7.0-040700-generic", arch: "amd64", family: "unix"

JUnit 5 integration spike

Issue Overview

JUnit 5 Final has been around for a while and we see more demand to bring integration with Arquillian for the community.

Goal of this spike is to explore what needs to be implemented and plan following tasks based on this.

There has been a discussion on the forum and a PoC started by Payara folks.

Automatically adding the test class can cause duplicate class problems

Automatically adding the test class to the application archive can result in duplicate classes within the application. In some cases, such as when the test class contains CDI beans, having duplicate classes within the same application causes deployment errors.

Unexpected org.xnio.XnioWorker.getContextManager() method call

Issue Overview

Build failure, unexpected call of org.xnio.XnioWorker.getContextManager() method while trying to deploy on local wildfly.

Expected Behaviour

Build without errors.

Steps To Reproduce
  1. Preinstalled local wildfly AS.

  2. Sample test:

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class ArquillianSampleTest  {

    @Deployment(testable=false)
    public static JavaArchive createDeployment() {
        return ShrinkWrap.create(JavaArchive.class)
                .addPackages( true, "com.my.package")
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    @Test
    public void sample() {
    }
}
  1. arquillian.xml
<arquillian xmlns="http://jboss.org/schema/arquillian"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.org/schema/arquillian
        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <defaultProtocol type="Servlet 3.0" />

    <engine>
        <property name="deploymentExportPath">target</property>
    </engine>

    <container qualifier="wildfly-embedded" default="true">
        <configuration>
            <property name="jbossHome">${jboss.home}</property>
            <property name="port">9090</property>
            <property name="allowConnectingToRunningServer">true</property>
        </configuration>
    </container>
</arquillian>
  1. dependencies:
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-container-managed</artifactId>
            <version>2.2.0.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-depchain</artifactId>
            <type>pom</type>
            <version>2.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
            <version>1.5.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>1.4.1.Final</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>1.4.0.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-core</artifactId>
            <version>1.4.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-api</artifactId>
            <version>1.4.1.Final</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-7.0</artifactId>
            <version>1.1.1.Final</version>
            <type>pom</type>
        </dependency>
  1. beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>

mvn clean test -f pom.xml -Djboss.home=$JBOSS_HOME 
Output
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.673 s <<< FAILURE! - in com.my.package.ArquillianSampleTest
[ERROR] com.my.package.ArquillianSampleTest  Time elapsed: 0.672 s  <<< ERROR!
java.lang.NoSuchMethodError: org.xnio.XnioWorker.getContextManager()Lorg/wildfly/common/context/ContextManager;

It looks like issue about some sort of dependencies version conflict.

Add "Servlet 3.1" Protocol

There are distinct behavioral (and feature sets) differences between "Servlet 3.0" and "Servlet 3.1", yet "Servlet 3.1" is not a valid choice.

Provide Arquillian as JUnit Rule

Looks like there is some work already did for this feature in #107.

Step steps for this as follows:

  • Fix/Update failing tests
  • Document behavior of method scoped Field Injection
  • Document behavior of custom TestRule if it depends on Arquillian Rule
  • Refactor all changes. Try to make it abstract.
  • Detection of runner vs rule conflict

Moving towards next major version

This issue is to gather important things to consider when moving to next majore Arquillian version. Please add more in the comments.

  • JUnit 5
  • Java 8 / 9

ResourceProvider canProvide() should also accept Qualifiers as arguments.

Currently arquillian only checks type inside canProvide and ignores qualifiers. This is really limiting as we can have multiple resource providers per type.

For example inside arquillian-cube the StandaloneCubeUrlResourceProvider is only meant to handle URLs annotated with @DockerUrl, but its canProvide() will return true for all URLs. This prevents me from creating and using something like a @KubernetesUrl.

So, I think that ideally we should have a more accurate canProvide or we should iterate over all resource providers until we get one that canProvde a non-null result.

Add System Environment resolution

As discussed in http://discuss.arquillian.org/t/arquillian-xml-alternative-format/206/12, you can configure arquillian using properties file or system properties (System.getProperties). Now it has been added support for configuring arquillian from system environment properties (System.getenv).

Moreover the override rules has been changed so that properties of the system has more precedence than properties of files.

So environment variables takes preference from system properties which takes preference from arquillian.properties which takes preference from arquillian.xml.

Original exception lost when thrown from @Before-annotated method

I have recognized that there seems to be an issue with JUnit and Arquillian.

If there is an exception in @before-annotated method, it seems to be lost. There is no entry in the log neither the test will be aborted instantly.

    @Before
    public void preparePersistenceTest() {
        throw new RuntimeException("test");

A NPE occurs in @after-annotated method. The @test-annotated method doesn't fail fast.

Here the console output:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.979 sec <<< FAILURE! - in RelocateTest
relocateSuccessful(RelocateTest)  Time elapsed: 0.24
1 sec  <<< ERROR!
java.lang.NullPointerException: null
        at RelocateTest.clearData(PackageRelocateTest.java:77)

I am using Arquillian JUnit Container 1.1.8.Final and JUnit 4.11.

arquillian-testng.jar does not include jcommander when using TestNG 7

Issue Overview

#232 adds support for TestNG 7.
When using arquillian 1.7.0.Alpha2 with TestNG 7.1.0 and wildfly 9.0.2 I have the following error when running my integration tests:

15:50:50,864 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /MyClassIT/ArquillianServletRunner: java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
at org.jboss.arquillian.testng7.container.TestNGTestRunner.execute(TestNGTestRunner.java:41) [arquillian-testng.jar:]
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:159) [arquillian-protocol.jar:]
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:125) [arquillian-protocol.jar:]
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:89) [arquillian-protocol.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
(...)
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException from [Module "deployment.MyClassIT.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.4.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455) [jboss-modules.jar:1.4.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404) [jboss-modules.jar:1.4.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385) [jboss-modules.jar:1.4.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130) [jboss-modules.jar:1.4.3.Final]

I extracted the arquillian-testng.jar artifact bundled in the *IT.war generated to understand the problem.
When using TestNG 6 (arquillian is working in this scenario), the arquillian-testng.jar contains the following packages:

  • bsh
  • com.beust.jcommander
  • com.beust.testng
  • com.google.inject
  • org.jboss.arquillian
  • org.testng

When using TestNG 7 (arquillian is not working in this scenario), the arquillian-testng.jar contains only the following packages:

  • com.google.inject
  • org.jboss.arquillian
  • org.testng

As you can see, when using TestNG7, all the transitive dependencies of TestNG7 (in particular jcommander) are not included in the arquillian-testng.jar artifact, which explains the ClassNotFoundException.
I don't know how/when the arquillian-testng.jar artifact is generated, but it seems that there is something broken here when using TestNG7.

Support JUnit compatible testing frameworks for which FrameworkMethod.getName() != FrameworkMethod.getMethod().getName() and which allow test method names with reserved url characters

Issue Overview

Currently, ServletMethodExecutor and the TestMethodExecutor implementation in org.jboss.arquillian.junit.MethodInvoker assume that FrameworkMethod.getName() == FrameworkMethod.getMethod().getName(). This is indeed the case for JUnit but is not for other JUnit compatible test frameworks like Spock. Spock allows whitespace in test names (which are obviously not allowed in method names in jvm bytecode) by overriding FrameworkMethod.getName().

A secondary issue is that ServletMethodExecutor expects there to be no reserved url characters in test method names and does not escape them in the urls that it composes but Spock allows them and, what's more, it is common practice to use them, especially spaces.

Expected Behaviour

Arquillian works with Spock out of the box for a basic specification using ArquillianTestClass and ArquillianTest rules:

import org.jboss.arquillian.junit.ArquillianTest
import org.jboss.arquillian.junit.ArquillianTestClass
import org.junit.ClassRule
import org.junit.Rule
import spock.lang.Shared
import spock.lang.Specification

class ArquillianSpecification extends Specification {

    @ClassRule
    @Shared
    ArquillianTestClass arquillianTestClass

    @Rule
    ArquillianTest arquillianTest

    def test() {
        expect:
        true
    }
}
Current Behaviour

The following exception is raised inside of the container when running the specification:

java.lang.Exception: No tests found matching Method $spock_feature_0_0(com.example.arquillian.spock.ArquillianSpecification) from org.junit.internal.requests.ClassRequest@5aad4517
	at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:61)
	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:139)
	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:117)
	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        ...
Steps To Reproduce

Steps to reproduce can be derived from the section on expected behaviour

URLResourceProvider does not behave consistently for servlet and non-servlet containers

Issue Overview

An injected @ArquillianResource URL ends with a slash for servlet containers but does not end with a slash for non-servlet containers. See also org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet.getBaseURIAsString() and org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider.toURL(HTTPContext) - only the host and port is used here and so no slash is added to the URL.

Expected Behaviour

The behavior should be identical for both use cases. It would probably make sense to always add a slash, e.g. url + "myResource" and not url + "/myResource. Also most Arquillian adapters are servlet-based.

NPE on shutdown using arquillian cube

Issue Overview

I get an NPE on shutdown, when arquillian cube is trying to kill a container. The NPE occurs while firing an event. It trying to get a scoped context, which is null, so triggers an NPE.

[WARNING] useSystemClassloader setting has no effect when not forking
Running org.apache.bookkeeper.tests.TestCompatUpgrade
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 116.721 sec - in org.apache.bookkeeper.tests.TestCompatUpgrade

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:15 min
[INFO] Finished at: 2018-01-18T12:35:47+01:00
[INFO] Final Memory: 362M/1541M
[INFO] ------------------------------------------------------------------------
Exception in thread "Thread-3" org.arquillian.cube.spi.CubeControlException: Could not stop bookkeeper3_f623d52e-92a0-442f-b926-f22f66f211bb
        at org.arquillian.cube.spi.CubeControlException.failedStop(CubeControlException.java:23)
        at org.arquillian.cube.docker.impl.model.DockerCube.stop(DockerCube.java:170)
        at org.arquillian.cube.impl.client.ForceStopDockerContainersShutdownHook$1.run(ForceStopDockerContainersShutdownHook.java:19)
Caused by: java.lang.NullPointerException
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:128)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
        at org.arquillian.cube.docker.impl.model.DockerCube.stop(DockerCube.java:152)
        ... 1 more
[INFO] Scanning for projects...
Expected Behaviour

No NPE, the docker container should be deleted.

Current Behaviour

NPE, docker container orphaned.

Steps To Reproduce
  1. Pull https://github.com/ivankelly/bookkeeper/tree/bc-tests-wip
  2. mvn install -Pdocker -DskipTests
  3. cd tests/backward-compat-upgrade/
  4. mvn test -DintegrationTests
Additional Information
~/src/bookkeeper $ mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_IE, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-5-amd64", arch: "amd64", family: "unix"

Arquillian Core version 1.3.0.Final onward throws Illegal Argument Exception.

Issue Overview

Arquillian Core version 1.3.0.Final onward throws the following exception:

java.lang.IllegalArgumentException: Can not add multiple org.jboss.shrinkwrap.api.Archive deployments with the same name: _DEFAULT_
Expected Behaviour

No exception or error should be thrown.

Current Behaviour

Illegal Argument Exception is thrown.

Steps To Reproduce
  1. update arquillian-cube extension to arquillian core version >= 1.3.0.Final
  2. execute HelloPodDeploymentOpenShiftITCase ftest

Provide a way to give precedence to ResourceProvider if multiple providers can provide resource of same type

Issue Overview

If multiple resource providers are on classpath which can provide resource of required type. Then arquillian takes first resource provider found on classpath.

There should be some way to provide precedence using which arquillian can return the required resource.

Also we should think for two different extensions having the same precedence while implementing this to avoid problems in the future.

java.lang.IllegalStateException: The Graphene runtime isn't initialized.

java.lang.IllegalStateException: The Graphene runtime isn't initialized.

Issue happens when running testng parallel tests.

Test should run in parallel
Test fails with the the error The Graphene runtime isn't initialized.
Steps To Reproduce
  1. Clone https://github.com/jagdeepjain/webdriver-arquillian-test
  2. run docker-compose up from the project root directory
  3. run mvn clean test from the project root directory
Additional Information

Maven home: /opt/apache-maven-3.5.0
JDK 1.8
Running on MacOS 10.15.5 (19F101

Console Output:

INFO: Detected dialect: W3C
Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 3.683 sec <<< FAILURE! - in TestSuite
f(org.jagdeep.example.arquillian.google.tests.GoogleTest2)  Time elapsed: 0.046 sec  <<< FAILURE!
java.lang.IllegalStateException: The Graphene runtime isn't initialized.
	at org.jagdeep.example.arquillian.google.tests.GoogleTest2.f(GoogleTest2.java:27)

f(org.jagdeep.example.arquillian.google.tests.GoogleTest3)  Time elapsed: 0.047 sec  <<< FAILURE!
java.lang.IllegalStateException: The Graphene runtime isn't initialized.
	at org.jagdeep.example.arquillian.google.tests.GoogleTest3.f(GoogleTest3.java:27)

f(org.jagdeep.example.arquillian.google.tests.GoogleTest1)  Time elapsed: 0.047 sec  <<< FAILURE!
java.lang.IllegalStateException: The Graphene runtime isn't initialized.
	at org.jagdeep.example.arquillian.google.tests.GoogleTest1.f(GoogleTest1.java:27)


Results :

Failed tests:
  GoogleTest1>Arquillian.run:138->f:27 ยป IllegalState The Graphene runtime isn't...
  GoogleTest2>Arquillian.run:138->f:27 ยป IllegalState The Graphene runtime isn't...
  GoogleTest3>Arquillian.run:138->f:27 ยป IllegalState The Graphene runtime isn't...

Full stack trace below:

<full-stacktrace>
              <![CDATA[java.lang.IllegalStateException: The Graphene runtime isn't initialized.
at org.jboss.arquillian.graphene.GrapheneRuntime.getInstance(GrapheneRuntime.java:116)
at org.jboss.arquillian.graphene.Graphene.instance(Graphene.java:323)
at org.jboss.arquillian.graphene.Graphene.waitGui(Graphene.java:216)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:43)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:263)
at org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$cRdPATVS$$EnhancerByGraphene$$f9a3849c.manage(<generated>)
at org.jagdeep.example.arquillian.google.page.GooglePage.goTo(GooglePage.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:129)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:169)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:241)
at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:237)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:263)
at org.jagdeep.example.arquillian.google.page.GooglePage$$EnhancerByGraphene$$9897962b.goTo(<generated>)
at org.jagdeep.example.arquillian.google.tests.GoogleTest1.f(GoogleTest1.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:230)
at org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:145)
at org.jboss.arquillian.testng.standalone.LocalTestMethodExecutor.execute(LocalTestMethodExecutor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:139)
at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:138)
at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:242)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:579)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
]]>

maven dep tree:

[INFO] org.jagdeep.example:arquillian-ui-test:jar:1.0-SNAPSHOT
[INFO] +- com.google.guava:guava:jar:23.0:test
[INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:test
[INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.0.18:test
[INFO] |  +- com.google.j2objc:j2objc-annotations:jar:1.1:test
[INFO] |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:test
[INFO] +- org.jboss.arquillian.graphene:graphene-webdriver:pom:2.3.2:compile
[INFO] |  +- org.jboss.arquillian.graphene:graphene-webdriver-api:jar:2.3.2:compile
[INFO] |  +- org.jboss.arquillian.graphene:graphene-webdriver-spi:jar:2.3.2:compile
[INFO] |  |  \- org.jboss.arquillian.core:arquillian-core-spi:jar:1.1.13.Final:compile
[INFO] |  +- org.jboss.arquillian.graphene:graphene-webdriver-impl:jar:2.3.2:compile
[INFO] |  |  +- org.jboss.arquillian.extension:arquillian-drone-impl:jar:2.5.1:compile
[INFO] |  |  |  \- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.1.15.Final:compile
[INFO] |  |  +- org.jboss.arquillian.extension:arquillian-drone-configuration:jar:2.5.1:compile
[INFO] |  |  +- cglib:cglib-nodep:jar:3.2.5:compile
[INFO] |  |  +- org.objenesis:objenesis:jar:1.2:compile
[INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.13.Final:compile
[INFO] |  |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-10:compile
[INFO] |  |  +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.1.13.Final:compile
[INFO] |  |  |  \- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:compile
[INFO] |  |  \- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.1.13.Final:compile
[INFO] |  +- org.jboss.arquillian.extension:arquillian-drone-webdriver-depchain:pom:2.5.1:compile
[INFO] |  |  +- org.jboss.arquillian.extension:arquillian-drone-api:jar:2.5.1:compile
[INFO] |  |  +- org.jboss.arquillian.extension:arquillian-drone-spi:jar:2.5.1:compile
[INFO] |  |  +- org.jboss.arquillian.extension:arquillian-drone-webdriver:jar:2.5.1:runtime
[INFO] |  |  |  +- org.arquillian.spacelift:arquillian-spacelift:jar:1.0.2:runtime
[INFO] |  |  |  |  +- org.arquillian.spacelift:arquillian-spacelift-api:jar:1.0.2:runtime
[INFO] |  |  |  |  \- org.apache.commons:commons-compress:jar:1.8.1:runtime
[INFO] |  |  |  +- commons-io:commons-io:jar:2.5:compile
[INFO] |  |  |  +- org.jsoup:jsoup:jar:1.8.3:runtime
[INFO] |  |  |  \- org.awaitility:awaitility:jar:3.0.0:runtime
[INFO] |  |  |     +- org.hamcrest:hamcrest-library:jar:1.3:runtime
[INFO] |  |  |     \- org.hamcrest:hamcrest-core:jar:1.3:runtime
[INFO] |  |  +- org.seleniumhq.selenium:selenium-api:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-support:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-chrome-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-firefox-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-ie-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-remote-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:htmlunit-driver:jar:2.28:compile
[INFO] |  |  |  \- net.sourceforge.htmlunit:htmlunit:jar:2.28:compile
[INFO] |  |  |     +- xalan:xalan:jar:2.7.2:compile
[INFO] |  |  |     |  \- xalan:serializer:jar:2.7.2:compile
[INFO] |  |  |     +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] |  |  |     +- org.apache.commons:commons-text:jar:1.1:compile
[INFO] |  |  |     +- org.apache.httpcomponents:httpmime:jar:4.5.3:compile
[INFO] |  |  |     +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.28:compile
[INFO] |  |  |     +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.28:compile
[INFO] |  |  |     |  \- xerces:xercesImpl:jar:2.11.0:compile
[INFO] |  |  |     |     \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] |  |  |     +- net.sourceforge.cssparser:cssparser:jar:0.9.24:compile
[INFO] |  |  |     |  \- org.w3c.css:sac:jar:1.3:compile
[INFO] |  |  |     +- commons-net:commons-net:jar:3.6:compile
[INFO] |  |  |     \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.7.v20170914:compile
[INFO] |  |  |        +- org.eclipse.jetty:jetty-client:jar:9.4.7.v20170914:compile
[INFO] |  |  |        |  \- org.eclipse.jetty:jetty-http:jar:9.4.7.v20170914:compile
[INFO] |  |  |        +- org.eclipse.jetty:jetty-xml:jar:9.4.7.v20170914:compile
[INFO] |  |  |        +- org.eclipse.jetty:jetty-util:jar:9.4.7.v20170914:compile
[INFO] |  |  |        +- org.eclipse.jetty:jetty-io:jar:9.4.7.v20170914:compile
[INFO] |  |  |        \- org.eclipse.jetty.websocket:websocket-common:jar:9.4.7.v20170914:compile
[INFO] |  |  |           \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.7.v20170914:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-opera-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-safari-driver:jar:3.11.0:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-edge-driver:jar:3.11.0:compile
[INFO] |  |  \- com.codeborne:phantomjsdriver:jar:1.4.1:compile
[INFO] |  \- org.seleniumhq.selenium:selenium-java:jar:3.11.0:compile
[INFO] |     +- net.bytebuddy:byte-buddy:jar:1.7.9:compile
[INFO] |     +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] |     +- commons-codec:commons-codec:jar:1.10:compile
[INFO] |     +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |     +- com.google.code.gson:gson:jar:2.8.2:compile
[INFO] |     +- org.apache.httpcomponents:httpclient:jar:4.5.3:compile
[INFO] |     +- org.apache.httpcomponents:httpcore:jar:4.4.6:compile
[INFO] |     +- com.squareup.okhttp3:okhttp:jar:3.9.1:compile
[INFO] |     \- com.squareup.okio:okio:jar:1.13.0:compile
[INFO] +- org.jboss.arquillian.testng:arquillian-testng-standalone:jar:1.7.0.Alpha2:compile
[INFO] |  +- org.jboss.arquillian.testng:arquillian-testng-core:jar:1.7.0.Alpha2:compile
[INFO] |  +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.7.0.Alpha2:compile
[INFO] |  |  \- org.jboss.arquillian.test:arquillian-test-api:jar:1.7.0.Alpha2:compile
[INFO] |  +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.7.0.Alpha2:compile
[INFO] |  |  \- org.jboss.arquillian.core:arquillian-core-api:jar:1.7.0.Alpha2:compile
[INFO] |  +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.7.0.Alpha2:compile
[INFO] |  \- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.7.0.Alpha2:compile
[INFO] |     +- org.jboss.arquillian.config:arquillian-config-spi:jar:1.7.0.Alpha2:compile
[INFO] |     \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0:compile
[INFO] \- org.testng:testng:jar:6.14.3:test
[INFO]    +- com.beust:jcommander:jar:1.72:test
[INFO]    \- org.apache-extras.beanshell:bsh:jar:2.0b6:test

Linkage error with arquillian-junit.jar

Hi,

We are trying to test our WAR file using Arquillian and restassured; everything was fine until we upgraded to arquillian-tomcat-embedded-7 1.0.0.CR7 with Tomcat 7.0.55 (from 1.0.0.CR5 with 7.0.47). Now, whenever we try to execute a restassured method whose signature contains a hamcrest Matcher, we are getting a linkage error like this:

java.lang.LinkageError: loader constraint violation: when resolving interface method "com.jayway.restassured.specification.ResponseSpecification.statusCode(Lorg/hamcrest/Matcher;)Lcom/jayway/restassured/specification/ResponseSpecification;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/wibble/web/resources/HealthResourceBeanIT, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, com/jayway/restassured/specification/ResponseSpecification, have different Class objects for the type cification.statusCode(Lorg/hamcrest/Matcher;)Lcom/jayway/restassured/specification/ResponseSpecification; used in the signature
at com.wibble.web.resources.HealthResourceBeanIT.getMessage(HealthResourceBeanIT.java:22)

This problem only happens with arquillian-junit-container. Switching the project to use TestNG and the arquillian-testng-container fixes everything.

My other solution is to create my own local version of org.jboss.arquillian.junit.container.JUnitDeploymentAppender.java that does not include "org.hamcrest".

Both of these solutions suggest that arquillian-junit.jar must not contain its own copy of the hamcrest classes.

[Question] Why NPE if ResourceProvider returns null

If you take a look at https://github.com/arquillian/arquillian-core/blob/master/test/impl-base/src/main/java/org/jboss/arquillian/test/impl/enricher/resource/ArquillianResourceTestEnricher.java#L131 you see that if a ResourceProvider returns a null, then an exception is thrown. I think that it should log as warning/info and return the null value. Maybe in any ResourceProvider might be important to return a null, or also it can happen that a post enricher is the responsible of enricher the element.

@bartoszmajsak @aslakknutsen WDYT?

Arq. servlet protocol and Jakarta EE 9

I recently started trying out Weld servlet with Jakarta EE 9 since there is now a Tomcat version for it.
See this related JIRA issue.

In that I figured that we are still using some Arq. to perform the testing, namely Arq. servlet protocol.
These bits are still outdated and use javax namespace which then causes failures (CNFE) during bootstrap.

Quick-scanning the code, I think we just need to swap this dependency and then change the namespaces accordingly within any related classes. But I have yet to try that (on it now).

However, I am not quite sure how we want to approach this with Arq. - whether we just update the core, or whether you want a separate EE 9 module for this. WDYT @bartoszmajsak?

FYI @starksm64

Getting Started guide not working

Issue Overview

Getting Started guide is not working as expected.

Expected Behaviour

Follow the guide.

Current Behaviour

org.jboss.arquillian.container.test.impl.client.deployment.ValidationException: DeploymentScenario contains a target (DEFAULT) not matching any defined Container in the registry.
Please include at least 1 Deployable Container on your Classpath.

Steps To Reproduce

Follow the guide it breaks at Whatโ€™s a test archive?

Move CI to Circle

Issue Overview

Travis is getting more and more unreliable and frequently under maintenance.

We should move our builds to a more stable and robust platform (ideally across the whole org).

This will require moving automation for two things:

  • regular build on PR / push to master
  • docs generation logic

Wrong/incompatible dependencies (shrinkwrap-resolver) in arquillian-bom since 1.6.0.Final?

Hi arquillian-team,

the last days I was trying to update my arquillian-bom (https://mvnrepository.com/) from 1.5.0.Final to 1.6.0.Final. But when I updated it, my tests (which were working before) was leading into the error [see stacktrace].

My code is looking the following:

@Deployment
public static WebArchive createDeployment() {
	File[] dependencies = Maven.configureResolver().workOffline().loadPomFromFile("pom.xml")
			.importRuntimeDependencies().resolve().withTransitivity().asFile();

	WebArchive archive = ShrinkWrap.create(WebArchive.class).addAsLibraries(dependencies)
			.addClass(IntegrationTest.class)
			.addPackages(true, Filters.exclude(".*Test.*"), "de.mycompany")
			.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
	return archive;
}

After debugging I found out that this line was responsable:

File[] dependencies = Maven.configureResolver().workOffline().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();

After that I was analyzing that the shrinkwrap-resolver-bom was changing between these versions from 2.2.6 to 3.1.4.
So if Iยดm using arquillian-bom-1.6.0.Final with shrinkwrap-resolver-bom-2.2.6 my tests were working like before. It seems there is something wrong with the newer version of shrinkwrap. The error is always comming up if Iยดm using shrinkwrap 3.x - versions, until shrinkwrap 2.2.7 everything is fine.
Itยดs also a bit strange that the 2.2.7 is from 02-2020 and 3.1.4 from 12-2019, but okay.

@bartoszmajsak
Btw. in the master-branch bom/pom.xml there is a line double [48:49] with the commit 61e4ebf:

<version.shrinkwrap_resolver>3.1.4</version.shrinkwrap_resolver>
<version.shrinkwrap_resolver>3.1.4</version.shrinkwrap_resolver>

Maybe you have some ideas/experiences whatยดs exactly the reason.

Thank you all!

Additional Information

Apache Maven 3.6.0
openjdk 11.0.2 2019-01-15

Stacktrace:
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive de.mycompany.IntegrationTest.createDeployment()
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:128)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(AnnotationDeploymentScenarioGenerator.java:91)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(AnnotationDeploymentScenarioGenerator.java:50)
	at org.jboss.arquillian.container.test.impl.client.deployment.AbstractDeploymentScenarioGenerator.generate(AbstractDeploymentScenarioGenerator.java:30)
	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:81)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:89)
	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
	at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:177)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:115)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.util.Iterator.forEachRemaining(Unknown Source)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
	at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:126)
	... 72 more
Caused by: java.lang.IllegalArgumentException: No dependencies were set for resolution
	at org.jboss.shrinkwrap.resolver.impl.maven.util.Validate.notEmpty(Validate.java:78)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.using(MavenStrategyStageBaseImpl.java:68)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.withTransitivity(MavenStrategyStageBaseImpl.java:52)
	at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.withTransitivity(MavenStrategyStageBaseImpl.java:39)
	at de.mycompany.IntegrationTest.createDeployment(IntegrationTest.java:57)
	... 77 more

Arquillian is not compatible with TestNG 7.x

Issue Overview

Arquillian is not compatible with TestNG 7.x

Expected Behaviour

Test is executed successfully.

Current Behaviour

Exception is thrown:

java.lang.NoSuchMethodError: org.testng.ITestNGMethod.getMethod()Ljava/lang/reflect/Method;

	at org.jboss.arquillian.testng.Arquillian$2.getMethod(Arquillian.java:213)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:129)
	at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:164)
Steps To Reproduce

Precondition: any Aruqillian test executing successfully with TestNG 6.x.

  1. Upgrade TestNG to the latest 7.x.
  2. Execute the test again.

EventTestRunnerAdaptor is not of expected type interface TestRunnerAdaptor

I have a maven project which I am deploying to a remote wildfly docker container. The EAR is deployed successfully and the tests are attempted but I am receiving this stack trace...

Running com.mycompany.tests.entity.BookTest
Aug 10, 2016 3:34:28 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.4.Final
Aug 10, 2016 3:34:28 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.4.Final
Aug 10, 2016 3:34:28 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.18.Final
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.934 sec <<< FAILURE!
testAddBook(com.mycompany.tests.entity.BookTest)  Time elapsed: 0.438 sec  <<< ERROR!
java.lang.RuntimeException: Loaded class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor is not of expected type interface org.jboss.arquillian.test.spi.TestRunnerAdaptor
    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:100)
    at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:113)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
    at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:170)
    at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:135)
    at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
    at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

my BookTest class

@RunWith(Arquillian.class)
public class BookTest {

    private static final Logger LOGGER = Logger.getLogger(BookTest.class.getName());

    @Deployment
    public static Archive<?> createDeployment() {
        return ShrinkWrap.createFromZipFile(
            EnterpriseArchive.class, new File("../PROJECTNAME-ear/target/PROJECTNAME-ear-1.0-SNAPSHOT.ear"))
                .addAsLibrary(ShrinkWrap.create(JavaArchive.class).addClass(BookTest.class));
    }

    @Inject
    MaintainBook maintainBook;

    @Test
    public void testAddBook() {
        Book book = new Book();
        book.setTitle("Test Book");

        BookResult addResult = maintainBook.addBook(book);

        Assert.assertEquals(addResult.getReturnCode(), new Integer(0));
    }
}

my pom.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>
    <parent>
        <artifactId>PROJECTNAME</artifactId>
        <groupId>com.mycompany</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <groupId>com.mycompany</groupId>
    <artifactId>PROJECTNAME-ejb</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>ejb</packaging>

    <name>PROJECTNAME-ejb</name>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>


        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.3.1.Final</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.3.10.Final</version>
        </dependency>

        <!-- MySQL database driver -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.39</version>
        </dependency>


        <!-- TEST DEPENDENCIES -->

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <!-- Arquillian (JUnit in a Container)-->
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>1.1.11.Final</version>
        </dependency>

        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-container-remote</artifactId>
            <version>2.0.0.Final</version>
            <scope>test</scope>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.3.0.Final</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <ejbVersion>3.1</ejbVersion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>7.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>unknown-jars-temp-repo</id>
            <name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
            <url>file:${project.basedir}/lib</url>
        </repository>
    </repositories>
</project>

my arquillian.xml

<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://jboss.org/schema/arquillian
        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <!-- Sets the protocol which is how Arquillian talks and executes the tests inside the container -->
    <defaultProtocol type="Servlet 3.0" />

    <!-- Configuration to be used when the WidlFly remote profile is active -->
    <container qualifier="widlfly-remote" default="true">
        <configuration>
            <property name="managementAddress">172.17.0.3</property>
            <property name="managementPort">9990</property>
            <property name="username">admin</property>
            <property name="password">admin</property>
        </configuration>
    </container>


</arquillian>

Arquillian does not execute the tests inside a jar

Arquillian tests inside a jar does not get executed

I have added a reproducible project here - https://github.com/vinsguru/arquillian-testng-package

  1. run mvn clean test -- you could see arquillian launching browser etc. Do not worry if the test passes or not for the time being.
    In stand-alone mode it executes just fine.

Now lets create a jar with all the dependencies.

  1. mvn clean package -DskipTests - to create a jar with all dependencies. - It creates the jar with test with all the dependencies to run my tests.

  2. now run test - java -cp arquillian-testng.jar org.testng.TestNG -testclass com.test.SearchTest -- arquillian without even excuting passes all the tests within few milli seconds.

To run testng in verbose mode - java -cp arquillian-testng.jar org.testng.TestNG -testclass com.test.SearchTest -verbose 10

Output:

[TestNG] INVOKING CONFIGURATION: "UNKNOWN" - @BeforeSuite org.jboss.arquillian.testng.Arquillian.arquillianBeforeSuite()
[TestNG] PASSED CONFIGURATION: "UNKNOWN" - @BeforeSuite org.jboss.arquillian.testng.Arquillian.arquillianBeforeSuite() finished in 93 ms
[TestNG] RUNNING: Suite: "Command line test" containing "1" Tests (config: null)
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeClass org.jboss.arquillian.testng.Arquillian.arquillianBeforeClass()
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeClass org.jboss.arquillian.testng.Arquillian.arquillianBeforeClass() finished in 2 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 3 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation guru")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation guru") finished in 5 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 2 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 2 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "selenium webdriver")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "selenium webdriver") finished in 4 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "dockerized selenium grid")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "dockerized selenium grid") finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 2 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation blog")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation blog") finished in 2 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "jmeter docker")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "jmeter docker") finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation guru")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation guru") finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "selenium webdriver")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "selenium webdriver") finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "dockerized selenium grid")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "dockerized selenium grid") finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 1 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation blog")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "test automation blog") finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @BeforeMethod org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "jmeter docker")
[TestNG] PASSED: "Command line test" - com.test.SearchTest.googleTest(java.lang.String)(value(s): "jmeter docker") finished in 1 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String))
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterMethod org.jboss.arquillian.testng.Arquillian.arquillianAfterTest(java.lang.reflect.Method)(value(s): public void com.test.SearchTest.googleTest(java.lang.String)) finished in 0 ms
[TestNG] INVOKING CONFIGURATION: "Command line test" - @AfterClass org.jboss.arquillian.testng.Arquillian.arquillianAfterClass()
[TestNG] PASSED CONFIGURATION: "Command line test" - @AfterClass org.jboss.arquillian.testng.Arquillian.arquillianAfterClass() finished in 1 ms
===== Invoked methods
  Arquillian.arquillianBeforeSuite()[pri:0, instance:com.test.SearchTest@c39f790] 205125520
  Arquillian.arquillianBeforeClass()[pri:0, instance:com.test.SearchTest@c39f790] 205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]test automation guru  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]selenium webdriver  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]dockerized selenium grid  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]test automation blog  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]jmeter docker  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]test automation guru  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]selenium webdriver  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]dockerized selenium grid  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]test automation blog  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
    SearchTest.googleTest(java.lang.String)[pri:0, instance:com.test.SearchTest@c39f790]jmeter docker  205125520
  Arquillian.arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:com.test.SearchTest@c39f790]public void com.test.SearchTest.googleTest(java.lang.String)  205125520
  Arquillian.arquillianAfterClass()[pri:0, instance:com.test.SearchTest@c39f790] 205125520
=====
PASSED: googleTest("test automation guru")
PASSED: googleTest("selenium webdriver")
PASSED: googleTest("dockerized selenium grid")
PASSED: googleTest("test automation blog")
PASSED: googleTest("jmeter docker")
PASSED: googleTest("test automation guru")
PASSED: googleTest("selenium webdriver")
PASSED: googleTest("dockerized selenium grid")
PASSED: googleTest("test automation blog")
PASSED: googleTest("jmeter docker")

===============================================
    Command line test
    Tests run: 10, Failures: 0, Skips: 0
===============================================

[TestNG] 
[TestNG] ===============================================
[TestNG]     Command line test
[TestNG]     Tests run: 10, Failures: 0, Skips: 0
[TestNG] ===============================================
[TestNG] INVOKING CONFIGURATION: "UNKNOWN" - @AfterSuite org.jboss.arquillian.testng.Arquillian.arquillianAfterSuite()
[TestNG] PASSED CONFIGURATION: "UNKNOWN" - @AfterSuite org.jboss.arquillian.testng.Arquillian.arquillianAfterSuite() finished in 2 ms

===============================================
Command line suite
Total tests run: 10, Failures: 0, Skips: 0
===============================================

File without license headers 2

Sorry for the noise ...
The following source file is without license headers:
./build/ide/eclipse/templates/junit/ArquillianJUnitTest.java
./build/ide/netbeans/templates/JUnit/ArquillianJUnitTest.java
./container/test-impl-base/src/main/java/org/jboss/arquillian/container/test/impl/enricher/resource/RemoteResourceCommand.java
./container/test-impl-base/src/main/java/org/jboss/arquillian/container/test/impl/enricher/resource/RemoteResourceCommandObserver.java
./core/impl-base/src/main/java/org/jboss/arquillian/core/impl/threading/ThreadedExecutorService.java
./core/impl-base/src/test/java/org/jboss/arquillian/core/impl/ThreadedExecutorServiceTestCase.java
./core/impl-base/src/test/java/org/jboss/arquillian/core/impl/loadable/util/FakeService.java
./core/impl-base/src/test/java/org/jboss/arquillian/core/impl/loadable/util/ShouldBeExcluded.java
./core/impl-base/src/test/java/org/jboss/arquillian/core/impl/loadable/util/ShouldBeIncluded.java
./javadoc/stylesheet.css
./junit/core/src/main/java/org/jboss/arquillian/junit/event/AfterRules.java
./junit/core/src/main/java/org/jboss/arquillian/junit/event/BeforeRules.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/AbstractRuleStatementEnrichment.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/InnerRuleInnerStatementEnrichment.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/OuterRuleInnerStatementEnrichment.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/OuterRuleOuterStatementEnrichment.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/ResourcesImpl.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/ResourcesProvider.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/RulesEnrichmentTestCase.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/TestingMethodRule.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/TestingMethodRuleInnerStatement.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/TestingStatement.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/TestingTestRule.java
./junit/core/src/test/java/org/jboss/arquillian/junit/rules/TestingTestRuleInnerStatement.java
./junit/standalone/src/main/java/org/jboss/arquillian/junit/standalone/AllLifecycleEventExecutor.java

./protocols/servlet/src/main/java/org/jboss/arquillian/protocol/servlet/arq514hack/descriptors/api/web/WebAppDescriptor.java
./testenrichers/cdi/src/main/java/org/jboss/arquillian/testenricher/cdi/container/CDIExtension.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/CDIInjectionEnricherTestCase.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/beans/Cat.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/beans/CatService.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/beans/Dog.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/beans/DogService.java
./testenrichers/cdi/src/test/java/org/jboss/arquillian/testenricher/cdi/beans/Service.java
./testenrichers/resource/src/test/java/org/jboss/arquillian/testenricher/resource/ResourceInjectionEnricherTestCase.java

thanks in advance
regards

Lookup value is null if classpath contains multiple ResourceProviders which canProvide lookup

Issue Overview

Currently ArquillianResourceTestEnricher is doing lookup for first provider from the classpath which can provide lookup. You can check code here

If classpath contains multiple providers which can provide lookup, then it's returning first provider lookup which is resolving using ArquillianResourceTestEnricher.

Expected Behaviour

Arquillian should take Provider which has higher priority among all providers which canProvide lookup.
Or it should lookup atleast all provider and return first non-null value.

Current Behaviour

It's providing first provider's lookup which may be null.

Extend expression language in arquillian configuration

Add ability to refer to a file being available in the project, but expended to the full path during test execution, so we can refer to it in a flexible way.

Current situation

We either provide a full path:

<container qualifier="daemon" default="true">
    <configuration>
      <property name="javaVmArguments">
        -Djavax.net.ssl.trustStore=/home/ike/project/module-a/src/test/resources/store.jks
      </property>
    </configuration>
  </container>

or use environment variables to make it configurable for different enviroments (local, ci, other devs)

<container qualifier="daemon" default="true">
    <configuration>
      <property name="javaVmArguments">
        -Djavax.net.ssl.trustStore=${env.LAUNCHER_TESTS_TRUSTSTORE_PATH}
      </property>
    </configuration>
  </container>

Desired solution

Have a way to refer to either relative location or involving classpath resolution: -Djavax.net.ssl.trustStore=${classpath("file")} to resolve to an absolute path.

Not sure if easily doable, but let's spike it for 2-3d.

ARQ-1896 Make JMX objectname configurable for JMXTestRunner and JMXMethodExecutor.

Currently, JMXTestRunner#runTestMethod(String className, String methodName) expects to find the test class and run the test method using the classloader set in the constructor. This is a problem when my tests are expected to run inside different containers (hence different classloaders). One easy work around is to publish one JMXTestRunner per container (hence unique objectname has to be provided to avoid conflict).

Maven central does not allow HTTP as of January 15, 2020

Issue Overview

Maven Central does not allow HTTP connection starting January 15, 2020. See https://support.sonatype.com/hc/en-us/articles/360041287334

arquillian-core 1.5.0.Final is still picking up
<version.shrinkwrap_resolver>2.2.6</version.shrinkwrap_resolver>

I think their 3.0 version has switched to HTTPS.

Expected Behaviour

Use HTTPS to connect to Maven Central

Current Behaviour

Use HTTP to connect to Maven Central

Steps To Reproduce
  1. [step 1]
  2. [step 2]
Additional Information

Need a new release for Jakarta EE 9 updates

Issue Overview

The testenricher submodules in the arquillian-core repo that have dependencies on the Java EE apis that will need to be updated to the Jakarta based packages that are part of the Jakarta EE 9 release.

Additional Information

The following submodules have Java EE dependencies that will need to be updated for a Jakarta EE 9 release that changes the package api namespace from javax to jakarta:

  • testenrichers/cdi
  • testenrichers/ejb
  • testenrichers/resource

Hard to discover why an @Observer method is not being invoked

If someone writes a method with @observer annotation and supply an argument that's impossible to be injected, that method will never be invoked.

But...

The user might have a hard time trying to find out the reason.

It would be good if we had some kind of warning printed out. It'd save us some time :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.