jboss-arquillian

Wildfly port offset not working with Arquillain

孤者浪人 提交于 2019-12-05 05:56:23
问题 Up until now I've been running my intergration tests using JBOSS AS 7 managed with Arquillian Testing framework. I have been setting the offset by 100 This has been working fine but now I want to transfer my integration tests to Wildfly AS managed but the same tests fail with the following error: arquillianBeforeSuite(com.aeroflex.teravm.selfinstall.core.ejb.SampleServiceIT) Time elapsed: 130.749 sec <<< FAILURE! org.jboss.arquillian.container.spi.client.container.LifecycleException: Could

Arquillian integration tests and OpenJPA enhancement

孤街醉人 提交于 2019-12-04 18:18:45
I'm working on a set of integration tests using arquillian and dbunit. I can run some of my tests just fine, but not the ones involving entities which have oneToMany relations with data in them. When running my tests I then get a PersistenceException: Caused by: java.lang.NullPointerException at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(JDBCStoreManager.java:451) My test looks like this: @RunWith(Arquillian.class) @CreateSchema("sql/masterplanCreateTables.sql") public class MasterPlanManagerBeanDbIT { @Rule public PersistenceUnitRule rule = new PersistenceUnitRule();

find all classes and interfaces a class extends or implements recursively

泪湿孤枕 提交于 2019-12-04 17:11:26
问题 I was wondering if there was an easy way of determining the complete list of Types that a Java class extends or implements recursively? for instance: class Foo extends Bar implements I1, I2 {...} class Bar implements I3 {...} interface I1 extends I4, I5 {...} interface I2 {...} interface I3 {...} interface I4 {...} interface I5 {...} class ClassUtil { public static Set<Class<?>> getAllExtendedOrImplementedTypesRecursively(Class<?> clazz){ ??? } } import static org.junit.Assert.*; public class

How to test EJB method call with Arquillian Weld EE Embedded

我的梦境 提交于 2019-12-04 12:02:28
I would like to test an EJB, and I want to test it with Weld EE Embedded as I don't want to deploy an applicatoin server for that. Here is my class : @RunWith(Arquillian.class) public class EJBTest { @Deployment public static JavaArchive createTestArchive() { return ShrinkWrap .create(JavaArchive.class, "test.jar") .addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); } @Stateless public static class SomeService { public String someMethod() { return "test"; } } @Inject SomeService someService; @Test public void testStatelessCall() { Assert.assertEquals("test",

How to add 'main/src/…/messages.properties' file to ShrinkWrap WebArchive?

余生长醉 提交于 2019-12-04 08:17:51
I have the following files in a project: com/example/module/Messages.java com/example/module/messages.properties Using ShrinkWrap.create(WebArchive.class, "test.war").addPackages(true, "com.example.module") only adds Messages.java to the generated archive. How can I add messages.properties ? Thanks. Edit. I am using addAsResource now but it only works for files that are under test/resources folder. How can I make it work with files under main/src ? Is there any maven configuration for that? The goal is to not duplicate files. Right now I have one file under main/src and a duplicate under test

How to access PrimeFaces components through Graphene in the most portable way?

▼魔方 西西 提交于 2019-12-04 05:48:59
问题 I'm writing Arquillian+Graphene functional tests for a Java EE web client with Primefaces 6.1 components and would like to write them in the most portable way from the beginning. I noticed that there's no possibility to perform operations like WebElement.click on any PrimeFaces component which is clickable (e.g. not on p:selectBooleanCheckbox since the WebElement is a div containing another div containing an input ), so that I have to figure out how a clickable component is structured for

Maven (surefire) test plugin excludes not working

巧了我就是萌 提交于 2019-12-04 04:16:15
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 default (anonymous) profile? I tried <includes><include>... and it works fine - only included tests

Arquillian tests fail on JBoss eap 6.1 (but working on JBoss 7.1.1)

。_饼干妹妹 提交于 2019-12-04 02:21:42
问题 I have a problem running my arquillian tests (started by a jenkins job) on a JBoss eap 6.1 server. It's no problem to run the tests on a JBoss 7.1.1 server, but when I switch to the eap 6.1 I get the following exception for all tests: java.lang.IllegalStateException: Error launching test at http://0.0.0.0:8080/test/ArquillianServletRunner?outputMode=serializedObject&className=testClass&methodName=testMethod&cmd=event. Got 503 (Service Unavailable) at org.jboss.arquillian.protocol.servlet

Maven is automatically skipping tests

僤鯓⒐⒋嵵緔 提交于 2019-12-03 10:56:20
问题 How come that Maven is skipping all of my tests by default?I have a pom.xml with few profiles and I am not able to run my tests through neither of them. One of my profiles looks like <profile> <id>jsf-test</id> <dependencies> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-arquillian-container-remote</artifactId> <version>${jboss.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.jsf.tests</groupId> <artifactId>jsf-app</artifactId> <version>${jsf

Debugging with Arquillian in IntelliJ - Managed Container

眉间皱痕 提交于 2019-12-03 09:04:01
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="deploymentExportPath">target/arq.deployments</property> </engine> <container qualifier="jboss" default=