No description, website, or topics provided.
Switch branches/tags
Clone or download
Patrick König
Latest commit d2d4380 Dec 6, 2018

BRAVA: IPK BrAPI Validator

Test suite for BrAPI servers. Test your server at

Under development, not carefully tested. If you find any errors or bugs, please report them as an issue!

BRAVA currently has two execution modes, simple and advanced mode. Simple mode contains the basic functionality: you can test any BrAPI server and get every endpoint defined in /calls tested.

The advanced mode requires a database (it can be an H2 database) to store test results and resource information. It includes a public repository list and the possibility to register resources to be tested periodically.


It is a bit of an awkward process right now. We'll migrate to Gradle and make things smoother in the future.

For now, you need to install Maven.

For simple version (just testing, no database required)

  1. Go to pom.xml and search for oracle jdbc driver:

Comment or delete it.

  1. Create an empty file named in src/main/resources.

  2. If you are behind a proxy, add this to

  1. Run it locally for the first time with:
mvn -U clean package jetty:run

Advanced version (includes public repository list and scheduled testing)

WARNING: This procedure is highly dependent on your environment and it hasn't been tested thoroughly. Something is likely to go wrong. DON'T PANIC and create an issue.

  1. If you use oracle, skip this step. Otherwise, go to pom.xml and search for oracle jdbc driver:

Comment or delete it.

  1. In pom.xml search for this line:

and replace it with:

  1. Go to src/main/resources and rename to Fill the fields with your details.

  2. Run it locally for the first time with:

mvn -U clean package jetty:run


To run locally use:

mvn jetty:run

To deploy to tomcat use:

mvn tomcat7:deploy

The tomcat server location must be defined as maven parameters. For example as a profile in settings.xml:


Also remember to add the server user and encrypted password to settings.xml.



You can send GET requests to the server to test other servers easily, and get a JSON report:


For example:


You can also get a report generated by the scheduled report system (either public or private) by using its id:



This testing suite uses RestAssured for testing.

To validate the responses, JsonSchema is used. All schemas are located in src/test/resources/schemas.

The test configurations are stored in two ways. For the 'simple' tests, where one resource is tested for status code, content type and response schema, are stored in tests.json.

The complex tests (Test Collections) are stored in the collections/ folder. They roughly follow Postman's collections format. Instead of using JavaScript for the tests, we define them using a few simple commands.

Command Description Example
StatusCode:{int} Check the status code of the response StatusCode:200
ContentType:{String} Check the Content Type of the response ContentType:application/json
Schema:{path} Check the response against a Schema located in src/main/resources/schemas Schema:/metadata
GetValue:{jsonpointer}:{variableName} Stores the value of the response in the pointer location GetValue:/result/data/0/germplasmDbId:germplasmDbId
IsEqual:{jsonpointer}:{variableName} Checks the value of the response in the pointer location with a stored variable IsEqual:/result/germplasmDbId:germplasmDbId
{command}:{value}:breakiffalse This flag stops the current endpoint testing if the test is failed. StatusCode:200:breakiffalse

Adding tests

  • Edit test collection found in /collections/