Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/perfana/test-events-neoload

Plugin to integrate Perfana and Neoload SAAS
https://github.com/perfana/test-events-neoload

Last synced: 2 days ago
JSON representation

Plugin to integrate Perfana and Neoload SAAS

Awesome Lists containing this project

README

        

# test-events-neoload

Events to start and stop Neoload tests.

This event plugin starts a Neoload test for the given LoadTest id.

The plugin sends live load test metrics to InfluxDB for analysis.

## events
The `beforeTest` and `abortTest` event are implemented.

The `beforeTest` starts the load test and polls the Neoload server.

## messages
This is a `readyForStartParticipant`, so only when this event plugin sends a `Go!` message
on the `eventMessageBus` the event scheduler can progress to the `startTest` event.
When the Neoload test execution reaches the `STARTED_TEST` state, the `Go!` message is sent.

## properties for Neoload:
* `neoloadAccountToken` the API SAAS token for Neoload API v4
* `neoloadTestId` the test id
* `influxUrl` the url to send InfluxDB data
* `influxDatabase`the name of the InfluxDB database (default: neoload)
* `influxUser` the InfluxDB user (optional, default none)
* `influxPassword` the InfluxDB password (optional, default none)
* `pollingPeriodInSeconds` seconds between check if test is in STARTING state (optional, default 4)
* `pollingMaxDurationInSeconds` max duration to check if test gets to STARTING state (optional, default 300)
* `overrideRuntimeSettings` overrides the constantLoadTime with project duration of first scenatio (default: true)
* `useProxy` activate proxy, for example to use with [mitmproxy](https://mitmproxy.org/)
* `proxyPort` port to use for proxy, uses localhost (optional, default 8888)

### notes
* neoloadAccountToken: generate in Neoload UI via Profile > Access Token > Generate new access token
* neoloadTestId: look up in browser url of Neoload UI, go to Test and extract TestId: `https://neoload.saas.neotys.com/#!test-settings//overview`

## variables

The Neoload plugin sends the following variables with a message on the `EventMessageBus`:
* perfana-neoload-testId
* perfana-neoload-testExecutionId

## use with events-*-maven-plugin

You can use the `test-events-neoload` as a plugin of the `events-*-maven-plugin`
by putting the `test-events-neoload` jar on the classpath of the plugin.

Use the `dependencies` element inside the `plugin` element as in the XML snippet below.

For example, with `perfana-test-client` plugin (from [example-pom.xml](src/test/resources/example-pom.xml)):

```xml


io.perfana
event-scheduler-maven-plugin


true
true
true
true

${systemUnderTest}
${version}
${workload}
${testEnvironment}
${testRunId}
${buildResultsUrl}
${rampupTimeInSeconds}
${constantLoadTimeInSeconds}
${annotations}
${tags}



NeoloadEvent1
abcdef0123456789abcdef0123456789abcdef0123456789
abcdef01-2345-6789-abcd-ef0123456789
http://localhost:8086
neoload


PerfanaEvent1
http://localhost:8888
false

<_var1>my_value







io.perfana
test-events-neoload
${test-events-neoload.version}


io.perfana
perfana-java-client
${perfana-java-client.version}


```

Try this by calling:

mvn -f src/test/resources/example-pom.xml event-scheduler:test

## Todo

* create lookups for the project and test ids based on names

## References

Works with the Perfana event-scheduler framework:
* https://github.com/perfana/event-scheduler
* https://github.com/perfana/event-Scheduler-maven-plugin