io.assertio.assertio client library

io.assertio.assertio client allows sending test data to io.assertio.assertio-server and receive assertions status in realtime

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

com.github.yanirta
ArtifactId

ArtifactId

assertio-java-client
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

io.assertio.assertio client library
io.assertio.assertio client allows sending test data to io.assertio.assertio-server and receive assertions status in realtime
Project URL

Project URL

https://github.com/yanirta/assertio
Source Code Management

Source Code Management

https://github.com/yanirta/assertio

Download assertio-java-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.yanirta/assertio-java-client/ -->
<dependency>
    <groupId>com.github.yanirta</groupId>
    <artifactId>assertio-java-client</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.yanirta/assertio-java-client/
implementation 'com.github.yanirta:assertio-java-client:0.0.1'
// https://jarcasting.com/artifacts/com.github.yanirta/assertio-java-client/
implementation ("com.github.yanirta:assertio-java-client:0.0.1")
'com.github.yanirta:assertio-java-client:jar:0.0.1'
<dependency org="com.github.yanirta" name="assertio-java-client" rev="0.0.1">
  <artifact name="assertio-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.yanirta', module='assertio-java-client', version='0.0.1')
)
libraryDependencies += "com.github.yanirta" % "assertio-java-client" % "0.0.1"
[com.github.yanirta/assertio-java-client "0.0.1"]

Dependencies

compile (7)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.21
com.squareup.okhttp3 : okhttp jar 3.14.2
com.squareup.okhttp3 : logging-interceptor jar 3.14.2
com.google.code.gson : gson jar 2.8.5
io.gsonfire : gson-fire jar 1.8.3
org.apache.commons : commons-lang3 jar 3.9
org.threeten : threetenbp jar 1.3.8

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

assertio ;) - make testing visible (concept version)

assertio is a visibility framework that built to make testing more tracable with built in benefits.

Out of the box key features:

  • Collect & trace historic tests executions.
  • Display reports on tests performance and execution.
  • Unify reporting from multiple nodes and projects.
  • Multi language * framework * platform support (currently Java & JavaScript).
  • Supports regression testing, pass or fail tests based on previous results.
  • Central point of evaluation, which means less bugs in writing tests.
  • Realtime indication on test execution.

The dashboard

assertio dashboard is the central location to see all the test executions and their results.

  • Starting from the tests list on the left-hand side, the dashboard reflects historically how the test was stable and succeeding.
  • Selecting one of the tests will reveal a list of individual executions, when diving into one of them will show all the available data from that point in time.

Screen Shot 2019-08-22 at 23 30 52

The components:

  • assertio server - Collects the data, report, further analysis & processing.
  • assertio client libraries - assertio-sdk to send the test-data.

Disclaimer

This is a minimal version to demonstrate the concept. Components and api's are subject to changes.

The server

  • Requirements
    • python 3.7 and above (other versions just weren't tested)
    • pip libraries: flask, flask_cors, connexion, and tinydb
    • nodeJS v12.6.0 (and above) with npm
  • preparing
    • clone the server folder (or the entire project)
    • in terminal (or cmd console) go to 'server/webapp' folder (cd server/webapp)
      • run npm i
      • run npm run build
  • Starting
    • in the 'server' folder (terminal or console) run python -m core.
  • Validation
    • web interface: head to http://localhost:8080 (https isn't supported yet). Note that before running any validations with one of the client libraries, a blank page will be displayed (my bad, TBD)
    • api interface: head to http://localhost:8080/api/0.0.1/ui swagger interface will be displayed.

Client libraries

  • Java - in new or existing project
    • installation (using maven)

      • insert the following dependency in project/dependencies section of your pom.xml file:
      <dependency>
          <groupId>com.github.yanirta</groupId>
          <artifactId>assertio-java-client</artifactId>
          <version>RELEASE</version>
      </dependency>
      
    • usage

      • create a new file 'assertioWelcomeTest.java' in your 'src/java/test/' folder and insert the following code:
      import io.assertio.assertio;
      import org.junit.Test;
      
      public class assertioTest {
          @Test
          public void assertBasics() {
              assertio assertion = new assertio("http://localhost:8080/api/0.0.1", "NA");
              assertion.assertEquals(5, 1 + 4, "My first assertio validation test");
          }
      }
      • run your code thorugh console/terminal via the command 'mvn test'
  • JavaScript - in new or existing project
    • installation (using npm):
      • in your project-root library console/terminal run npm i assertio-js-client
    • usage
      • create a new file 'assertioWelcomeTest.js' in your 'src/java/test/' folder and insert the following code::
      var assertio = require('assertio-js-client').default;
      
      describe("my first assertio test", () => {
          var client = new assertio("NA", "http://localhost:8080/api/0.0.1");
      
          it("making my first test", () => {
              return client.assertEquals(5, 2 + 3, "My first assertio validation");
          });
      })

The api

The api and the lower level of both the server and the clients were built with swagger/openapi using openapi generatior. In order to communicate directy with the api you can go to http://localhost:8080/api/0.0.1/ui after starting the server.

The author

Yanir Taflev - freelancer consultant and developer Owner of qualitalks My Gihub profile

License

MIT

Versions

Version
0.0.1