jboss-arquillian

Arquillian - running tests not working

泄露秘密 提交于 2019-12-24 06:01:53
问题 I am trying to add an test based on arquillian . When I do mvn test I get this error: Test: @RunWith(Arquillian.class) public class SomeEntityServiceTest extends ApiTestCase { @Inject CartStatusService service; @Test public void testCreate() throws Exception { SomeEntity someEntity = new SomeEntity(); someEntity.setActive(1); service.create(someEntity); } } ApiTestCase: public class ApiTestCase { @PersistenceContext(unitName = "myDataSource") protected EntityManager em; @Deployment public

How do I run a standard Arquillian EJB Session Test with Maven?

天大地大妈咪最大 提交于 2019-12-23 22:54:45
问题 I'm brand new to Arquillian and Maven, having just started with both this week so I apologize for the simple question. Needless to say I've put in some real hours learning the ropes. For my latest trick I'm trying to setup a standard EJB Session Bean. Most of my knowledge has come from the Arquillian getting started guides: http://arquillian.org/guides/getting_started/ http://arquillian.org/guides/getting_started_rinse_and_repeat/ http://docs.jboss.org/arquillian/reference/1.0.0.Alpha1/en-US

How to use PowerMock with Arquillian?

狂风中的少年 提交于 2019-12-23 12:35:07
问题 I tried to use PowerMockRule in a JUnit test that uses arquillian but I get java.lang.ExceptionInInitializerError Caused by: java.lang.IllegalStateException: PowerMockRule can only be used with the system classloader but was loaded by ModuleClassLoader for Module I want to test something like this: @RunWith(Arquillian.class) @PrepareForTest(WARRRAworkffsTest.class) public class WARRRAworkffsTest { @Rule public PowerMockRule rule = new PowerMockRule(); @Deployment(testable=true) public static

arquillian UnsupportedOperationException when use InSequence annotation

妖精的绣舞 提交于 2019-12-22 12:32:38
问题 I get the error when I add @InSequence annotation to my tests: java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableList$1.set(Collections.java:1412) at java.util.Collections.sort(Collections.java:234) at org.jboss.arquillian.junit.Arquillian.getChildren(Arquillian.java:71) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:426) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:351) at org.junit.runners.Suite.describeChild(Suite

Arquillian: starts the server but doesn't deploy

 ̄綄美尐妖づ 提交于 2019-12-22 08:04:11
问题 I am adding Arquillian to my project, I started with helloworld example: @RunWith(Arquillian.class) public class AccountTest { @Deployment public static JavaArchive createTestArchive() { return ShrinkWrap.create(JavaArchive.class).addClasses(CustomerLookupLocal.class, CustomerLookup.class); } @Test public void shouldBeAbleToReadSysPropAtStartup() { Assert.assertTrue(1 == 1); } I added to my pom such dependencies: <dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.arquillian

Arquillian integration tests and OpenJPA enhancement

空扰寡人 提交于 2019-12-21 23:21:29
问题 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

Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

☆樱花仙子☆ 提交于 2019-12-21 09:19:19
问题 I have this pom.xml file <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> <groupId>company</groupId> <artifactId>trick-services-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>tricker-services-webapp</artifactId> <packaging>war</packaging> <name>trick-rest</name> <!--

Explicite Local EJB not injected with Arquillian

a 夏天 提交于 2019-12-20 10:44:57
问题 I use Arquillian to test an stateless session bean that has an explicit local and remote interface. But in the test Arquillian does not "inject" anything in a field that has the type of the local interface, but it works for the remote interface. @Stateless public class TestServiceImpl implements TestServiceLocal, TestServiceRemote { public String greet() { return "hallo"; } } The remote interface: @Remote public interface TestServiceRemote { public String greet(); } The locale interface:

Arquillian integration test code coverage issue with Jacoco

对着背影说爱祢 提交于 2019-12-20 05:19:17
问题 I am doing integration testing using arquillian and tomee remote plugin. it is working good. But my code coverage is not working. I am using Jacoco plugin for code coverage. Getting Exception in my Java class java.lang.instrument.IllegalClassFormatException: Error while instrumenting com/demo/EmpService How to do code coverage in remote container using Jacoco ? Note: I have passed javaagent ( argLine ) to server catalina opts in integration phase. I am injecting my bean in test class and

Build Path Issue with Maven Dependencies (jconsole-jdk.jar) [duplicate]

半腔热情 提交于 2019-12-18 19:27:35
问题 This question already has answers here : Missing artifact “sun.jdk:jconsole:jar:jdk” (7 answers) Closed 2 years ago . I switched to Wildfly 8.1 and can not resolve this build (path) problem, which somehow is eventually influenced by arquillian test framework. pom.xml : <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <version.org.jboss.arquillian>1.1.5.Final</version.org.jboss.arquillian> <version