Nexus Performance Testing Library
Java Shell
Latest commit 93c860e Aug 21, 2015 @mrprescott mrprescott New scenarios.
Permalink
Failed to load latest commit information.
data Merging 'nx3-poc' branch Jul 7, 2015
scenarios New scenarios. Aug 21, 2015
src
.gitignore Merging 'nx3-poc' branch Jul 7, 2015
LICENSE
README.md Merging 'nx3-poc' branch Jul 7, 2015
h2-1.3.173.jar Initial commit of simple nexus perf library Nov 22, 2013
h2-shell.sh
pom.xml Merging 'nx3-poc' branch Jul 7, 2015
prime.sh Merging 'nx3-poc' branch Jul 7, 2015
runtest.sh New scenarios. Aug 21, 2015

README.md

Nexus Performance Testing Library

A Sonatype Nexus quick & dirty performance regression and stress test library.

Building

mvn clean install

This creates an uber jar in target which contains all the needed dependencies.

For certain dependencies to be resolved and code to be buildable ( ie. nexus pro features ) you need access to the following Sonatype repository using your Sonatype Customer Credentials

https://repository.sonatype.org/content/groups/private-nexus-dev/

See https://support.sonatype.com/entries/21582466-How-can-I-write-a-custom-staging-rule- for more info

How it works

Using the details in the scenario xml file, the program spins up request threads for nexus. During the scenario run, metrics are captured. At scenario end, metrics are stored in a local h2 database. If asked, the program will compare these new metrics with a previous run, and fail if the metrics are outside a threshold.

You can only tell this library:

  • where you nexus lives
  • what URLs to access
  • authentication to use
  • number of simulated clients
  • rate of requests

Creating Scenarios

Scenarios are defined using xml files in the scenarios directory. Use existing scenarios as an example or review the code.

Scenarios are hard-coded to target specific repositories. You may need to configure your test instance of Nexus appropiately for your chosen scenario.

Adding Scenario Data

Data files are parsed to produce a stream of URLs that are then consumed by the scenario. CSV and standard NCSA log files (tar/gzipped) can be parsed to simulate actual requests.

Configuring your Nexus Under Test

Setting up Nexus is up to you! This library does not aim to help you with that.

Running

To run test scenario and record performance metrics in db (obviously, use actual baseline version).

./runtest.sh sample-scenario 2.4.0-09

To run test scenario, record performance metrics and the db and compare performance to an earlier scenario run

./runtest.sh sample-scenario 2.5.0-03 2.4.0-09

To run test scenario, compare performance to an earlier scenario run, do not record metrics in the db. Useful to test scenario itself

./runtest.sh sample-scenario - 2.4.0-09

Nexus 2 vs. Nexus 3

The NEXUS_LAYOUT variable within runtest.sh should be set to 'NX2' when running perf tests against NX2.