Skip to content

Framework to do end-to-end testing for distributions based on Apache Karaf

License

Notifications You must be signed in to change notification settings

openengsb-labs/labs-endtoend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karaf End-To-End Testing Framework

This library provides a simple and direct access to execute integration tests against any Apache Karaf based distribution.

Build Status

Quickstart

  • Add the distribution as dependency to your pom.xml

  • Add the depends-maven-plugin to your pom:

<plugin>
  <groupId>org.apache.servicemix.tooling</groupId>
  <artifactId>depends-maven-plugin</artifactId>
	<version>1.2</version>
	<executions>
    <execution>
		  <id>generate-depends-file</id>
			<goals>
				<goal>generate-depends-file</goal>
			</goals>
		</execution>
	</executions>
</plugin>
  • Make sure that in the resources folder a context configuration file for your system exists and is named according to the form endtoend.[[osName]].[[osArch]].properties

Currently possible values are: osName: linux, mac, win osArch: x86, x86_64, amd64

  • Define at least the distribution.uri in the configuration file: distribution.uri = mvn-vless:[[groupId]]:[[artifactId]]:[[type]]:[[classifier]]

Other possible parameters are: karaf.appname (default: karaf) karaf.port (default: 8101) karaf.cmd (default: bin/karaf) karaf.client.cmd (default: bin/client) karaf.root (default: .)

  • To run tests on your distribution use the framework like this:
DistributionResolver dr = new DistributionResolver();
DistributionExtractor ds = new DistributionExtractor(new File(EXTRACTION_DIR));

testContextLoader = new TestContextLoader(dr, ds);
testContextLoader.loadContexts();

defaultContext = testContextLoader.getDefaultTestContext();
context.setup();

// Test distribution...

context.teardown();

A good working example can be found in ExecuteListCommandTest in the itest module.

Documentation

The full documentation is located at the github wiki

Build

While all final releases are available via maven central you can also build latest snapshots locally by using "mvn install" with Apache Maven 3.x and Java 7.x.

About

Framework to do end-to-end testing for distributions based on Apache Karaf

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages