npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jolie/jot

v0.0.27

Published

Jolie Testing suit

Downloads

29

Readme

jot - Jolie testing suite

jot logo

jot is a command-line tool for testing Microservice Architectures(MSAs). The tool is developed using Jolie, a service oriented programming language that empathize the structured linguistic approach to the programming of services.

jot provides a Jolie developer ability to develop a service that will act as a tester service in the project. With the concept of tester service, it can also be used to test any services with the protocol that Jolie supports.

Installing

Using npm:

# install in a project
npm install @jolie/jot

Usage

Running jot

Provide a field in package.json script to invoke jot through npm run

  "scripts": {
    "test": "jot [jot_configuration.json]"
  },

then you can invoke jot using npm run test

npm run test

jot Configuration file

jot requires the user to provide detail for testing service in json format.

{
  "test": "test", // path to test directory. Default: "test"
  "params": { // parameter for jot, key of this object defines the Jolie service that jot will launch
    "service.ol": [ 
      {
        "name": "main", // name of the service
        "params": { } // parameter to pass to the `main` service that reside in TestJot.ol
      }
    ]
  },
  "reporters": { // [OPTIONAL] reporter configuration
    "path": "", // path to custom reporter module
    "service": "" // reporter service
  }
}

See examples folder for basic usage in practice.

Annotation

Currently, jot supports 5 annotations for describing the test cycle between test service, namely @BeforeAll, @BeforeEach, @Test, @AfterEach, @AfterAll.

The operation invocation inside testing service The life cycle for each service operation invocation is following, from top to bottom.

@BeforeAll
    |
@BeforeEach
    |
  @Test
    |
@AfterEach
    |
@AfterAll

Note that the execution order for each operation is non-deterministic.

Customize Reporter

jot provides an ability to customize the test runner by providing a set of operations that a user may use to change the result to show on console. The default reporter is shown in spec.ol

type Service {
    title: string // test service name
}

type Test {
    title: string // test operation name
}

type TestFailed {
    title: string // test operation name
    error: any // error message
}


/**
	metrics data collected by the test runner
*/
type Stats {
	tests: int
	passes: int
	failures: int
	services: int
	durations: long
}

/**
    interface that jot will use to communicate with the reporter
 */
interface ReporterInterface {
	RequestResponse: 
        // fires when the test runner finished it's instantiation
        eventRunBegin(void)(void),

        // fires when the test operation pass
        eventTestPass(Test)(void),

        // fires when the test operation fail
        eventTestFail(TestFailed)(void),

        // fires when a testing service finished it's instantiation
        eventServiceBegin(Service)(void),

        // fires when a testing service completes all the testing operations
        eventServiceEnd(Stats)(void),

        // fires when the test runner complete all the testing services
        eventRunEnd(void)(void)
}