jboss-arquillian

java.util.ServiceConfigurationError when running tests using arquillian+omnifaces

拥有回忆 提交于 2019-12-10 04:52:50
问题 I am getting the following error "java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider org.omnifaces.ApplicationInitializer not found" when running Arquillian tests. I have put the most basic test case I could here: https://www.dropbox.com/s/kou5v8kqs5g4g4m/test.zip?dl=0 回答1: After trying to run a built war and running it on Wildfly standalone, I managed to narrow the problem to Arquillian, after testing Arquillian+Glassfish embedded and running without

Maven (surefire) test plugin excludes not working

二次信任 提交于 2019-12-09 17:07:06
问题 I have following configuration in my pom.xml <build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> <configuration> <excludes> <exclude>**/DocumentChangeSubscriberTest.java</exclude> </excludes> </configuration> </plugin> (...) DocumentChangeSubscriberTest is an arquillian test that I want to run only in specified profile. When I type mvn install all tests are run, even DocumentChangeSubscriberTest that I want to exclude. How to exclude test from the

'Already Connected' exception trying to do POST request using Jersey Client API

前提是你 提交于 2019-12-09 07:57:21
问题 I'm creating integration tests for a JAX-RS/Jersey Webservice deployed on Tomcat 8 using arquillian. I am trying to do a POST request like that: E dummy = dummyFactory.manufacturePojo(getSubClassType()); dummy.setId(null); Client client = ClientBuilder.newClient(); WebTarget target = client.target(BASE_URI).path("bandeira"); Response response = target.request(MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, CHAVE_TESTE) .header(HttpHeaders.CONTENT_TYPE, "application/json") .post

How to add library in arquillian service deployment?

我与影子孤独终老i 提交于 2019-12-09 07:55:38
问题 i'm currently using Arquillian for jboss(remote) and i'm trying to make Jmockit work. I deployed an ear which works fine, but i'm getting this error for arquillian-service: java.lang.NoClassDefFoundError: mockit/internal/state/TestRun Caused by: java.lang.ClassNotFoundException: mockit.internal.state.TestRun from [Module "deployment.arquillian-service:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) I'm using jMockit 1.7 and have

Debugging with Arquillian in IntelliJ - Managed Container

筅森魡賤 提交于 2019-12-09 07:12:44
问题 I've tried many times to debug a Test in managed container enviroment. I get errors like JDWP Transport Error , socket failed to initialize . Means I can not initialize arquillian with the below property tag. My arquillian.xml file looks like this: <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"> <engine> <property name=

Testing jpa entity classes - error Transaction is required

佐手、 提交于 2019-12-09 03:23:09
问题 Based on an archetype i created a java ee app. There is an included arquillian test that runs fine. it just calls a method on a @Stateless bean that persists an pre-made entity. now i added some entity with some relations and i wrote a test for them. But on peristing any entity i get Transaction is required to perform this operation (either use a transaction or extended persistence context) I think i need to mark the testmethod with @Transactional but it seems not to be in class path.

Injecting @Stateless EJB in Arquillian tests

北城余情 提交于 2019-12-08 05:33:57
问题 A weird problem when running Arquillian test. If I try to use an EJB annotated with @Stateless, I get this error: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [MyEjbRemote] with qualifiers [@Default] at injection point [[field] @Inject private com.org.app.ejb.InjectionTest.ejb] I have the following test class + deployment for the Arquillian: @RunWith(Arquillian.class) public class InjectionTest extends TestCase { @Inject private MyEjbRemote ejb;

“IllegalStateException: Incompatible execution data for class in…” exception from Jacoco when run for an existing ear

你。 提交于 2019-12-08 05:24:39
问题 I’m trying to test a legacy big fat EAR (app.ear) application using Arquillian and TestNG. To run the test I have added the testable war file (test.war) in to the existing app.ear and deployed on WildFly 10 server remotely. @Deployment public static EnterpriseArchive createDeployment(){ return ShrinkWrap.createFromZipFile(EnterpriseArchive.class, new File("../earapp/target/earapp-0.0.1-SNAPSHOT.ear")) .addAsModule(Testable.archiveToTest(ShrinkWrap.create(WebArchive.class, "test.war")

Initialize Page Objects - Arquillian - Selenium

被刻印的时光 ゝ 提交于 2019-12-08 04:30:01
问题 I am new to Selenium and Arquillian framework. I am trying to implement Page Object Model. Webdriver browser capabilities are saved in arquillian xml file. I am using TestNG and created the following classes: public class Test{ @Drone Webdriver driver; @Page Login login; @Page Home home; public void createOrderTest(){ login.navigateURL(); login.setcredentials(); home.createOrder(); } } public class Login{ // Webelements needed in methods below are declared here public void navigateURL(){

Arquillian vs EJB embeddable container

笑着哭i 提交于 2019-12-07 16:29:22
问题 I am trying to understand the differences between the EJBContainer class provided by Java EE 6 for embeddable unit testing of EJB modules and Arquillian. Is there a good resource or can someone help me in understanding this? Is it worth to write Arquillian tests when I could test EJBs using an embeddable container? 回答1: Full disclosure: I'm contributor of Arquillian Arquillian is a component model for integration testing . By using the EJBContainer , you bring the runtime(the container in