3

Running Arquillian Tests from Eclipse - Mastertheboss

 2 years ago
source link: http://www.mastertheboss.com/jboss-frameworks/arquillian/running-arquillian-tests-from-eclipse/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Running Arquillian Tests from Eclipse

3 February 2022 by F.Marchioni

Have you ever wondered how to run Arquillian Integration tests without leaving your favourite IDE? Then keep reading! For the purpose of this example, we will be using Eclipse, however you can easily adapt it to any other IDE such as Idea or Visual Studio.

An Arquillian Project to Test

Our short demo will be using the Arquillian example discussed in this article: Getting started with Arquillian

As you know, the default Arquillian set up includes two Maven Profiles:

  • The Managed Profile: This profile will start a new WildFly / JBoss EAP instance, and execute the test, shutting it down at the end of it.
  • The Remote Profile: This profile will connect to a running WildFly / JBoss EAP instance, and execute the test against it.

For the purpose of this demo, we will use the Managed Profile. Therefore, open the arquillian.xml file and set the “managed” container as default, including the location of your application server:

<container qualifier="managed" default="true">
<configuration>
<property name="jbossHome">/home/jboss/wildfly-26.0.1.Final/</property>
</configuration>
</container>
<container qualifier="managed" default="true">
	<configuration>
	    <property name="jbossHome">/home/jboss/wildfly-26.0.1.Final/</property>
	</configuration>  
</container>

Next, right-click on your project and select Maven | Maven Profiles:

Choose, as in the above picture, the arq-managed profile.

Now, you can simply run your Arquillian Test class by right-clicking on it and choosing Run As | JUnit Test:

Categories Arquillian Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK