Giter Site home page Giter Site logo

loadster / loadster-sdk-java Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 3.86 MB

Client SDK for the Loadster Workbench API

Home Page: https://loadster.app

License: Apache License 2.0

Java 100.00%
load-testing performance-testing load-test performance-test sdk testing-tools

loadster-sdk-java's Introduction

loadster-sdk-java

This is the Java SDK for the Loadster Workbench API. As a desktop application, Loadster Workbench might not be the most obvious candidate to provide a REST API but we've had customer requests for better remote and programmatic access to certain features so this is where to start!

To learn about how to use the SDK with Loadster Workbench, see The Loadster Workbench API.

Usage

The SDK is available in the public repository at JCenter https://bintray.com/jcenter/loadster/loadster-sdk-java/. Follow the instructions there to include it in your Maven, Gradle, or Ivy build.

<!-- Maven -->
<dependency>
  <groupId>com.loadsterperformance</groupId>
  <artifactId>loadster-sdk-java</artifactId>
  <version>1.6</version>
  <type>pom</type>
</dependency>

// Gradle
compile 'com.loadsterperformance:loadster-sdk-java:1.6'

You can also download pre-built jars from releases.

Use the SDK library with your own code to build integrations, or by itself if you want to kick off a test from the command line (see below).

Philosophy

While the API itself has RESTful semantics, this SDK is more about giving you what it takes to get things done fast. The SDK will end up feeling a lot more procedural than resource-based.

Package Structure

loadster.sdk.tasks - Tasks that can be invoked from the command line, wrapped in a Maven mojo or Jenkins plugin, etc. For example, to kick off a load test remotely, check out RunTest.

loadster.sdk.client - Easy access to important API functions. Have a look at WorkbenchApiClient as a starting point.

loadster.sdk.types - Dumb little POJOs that map very closely to the JSON responses coming back from the API. If the SDK does its job, you'll be dealing with these objects instead of the JSON itself.

loadster.sdk.exceptions - When something goes wrong in the API, we try to map it to an exception so you don't have to worry about HTTP 2xx/3xx/4xx/5xx error codes and all that.

Running a Test

If you have Loadster Workbench running, you can trigger a test remotely via the SDK. This is helpful if you want to integrate load testing into your CD pipeline or run tests on a schedule.

$ java -cp loadster-sdk-1.4-all.jar -Dloadster.api.key=changeme -Dloadster.api.host=localhost loadster.sdk.tasks.RunTest <project-id> <scenario-id> report.html

The <project-id> and <scenario-id> can be obtained by right clicking your test scenario in Loadster Workbench and selecting "Info...". The values will be in a path like /projects/<project-id>/scenarios/<scenario-id>.

You can obtain and set your Loadster Workbench API key in Preferences.

Compatibility

Loadster Workbench Version Recommended SDK Version
3.9.6+ 1.6
3.6.0-3.9.5 1.2
3.2.0-3.5.6 1.0

Licensing

Loadster is a commercial product, but our SDK is available under the Apache License v2.

loadster-sdk-java's People

Contributors

azhawkes avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.