0.1.0 • Published 21 days ago

@syntest/javascript v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
21 days ago

SynTest Framework - JavaScript

The aim of this tool is make it easier for JavaScript developers to test their code in a more effective and efficient way.

A tool to generate synthetic tests for the JavaScript language

What is SynTest JavaScript?

SynTest JavaScript is a tool for automatically generating test cases for the JavaScript language. This tool is part of the SynTest Framework. This framework contains multiple tools related to the generation of synthetic tests.

Overview

The common core contains the common interfaces for the code control-flow representation, test case structure, genes, and the implementation for the meta-heuristic search algorithms.

Installation

NPM

The simplest way to use syntest-javascript is by installing the npm package.

$ npm install @syntest/javascript

You can install it in your project as shown in the snippit above or you can install the package globally by using the npm options -g.

From source

The tool can be used by cloning the project, installing its dependencies, and compiling the TypeScript:

  • Clone the projects
$ git clone git@github.com:syntest-framework/syntest-javascript.git
  • Install dependencies
$ cd syntest-javascript; npm install
  • Build Syntest-javascript
$ cd syntest-javascript; npm run build

You can create a .syntest.js file to change the way the tool behaves.

Finally run the tool

cd <PATH_TO_SYNTEST_JAVASCRIPT>; npm run standalone

The results can be found in the syntest folder

Usage

To start you need to be in the root of the project folder containing the code you want to create test-cases for. Next, you need to install two dev-dependencies in your project, namely chai and chai-as-promised. Both are needed to run the tests.

After installing these dependencies together with the tool, you can run the following example command.

$ syntest-javascript --target-root-directory="<PATH_TO_YOUR_SOURCE_FOLDER>/src" --total-time=10

This will test all javascript code that is contained in the source folder. It will run for 10 seconds.

SynTest-JavaScript is highly configurable and supports a bunch of options and arguments, all of them can be found by providing the --help option or -h for short. Another way of configuring the tool is by putting a .syntest.js file in the root of your project. The file should have the following structure:

module.exports = {
    "population-size": 10,
    "max-depth": 5,
    ...
}

Documentation

For questions and help with how to use this tool, please see the documentation.

Support

For questions and help with how to use this library, please see SUPPORT.md.

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. For more information, please see CONTRIBUTING.md.

Authors and acknowledgment

  • Annibale Panichella (PI)
  • Mitchell Olsthoorn (Project Lead)
  • Dimitri Stallenberg (Developer)

License

The code within this project is licensed under the Apache-2.0 license.

0.2.0-beta.25

21 days ago

0.2.0-beta.24

1 month ago

0.2.0-beta.22

2 months ago

0.2.0-beta.23

2 months ago

0.2.0-beta.21

2 months ago

0.2.0-beta.20

2 months ago

0.2.0-beta.19

3 months ago

0.2.0-beta.9

5 months ago

0.2.0-beta.10

5 months ago

0.2.0-beta.11

5 months ago

0.2.0-beta.12

5 months ago

0.2.0-beta.13

5 months ago

0.2.0-beta.14

5 months ago

0.2.0-beta.15

5 months ago

0.2.0-beta.16

5 months ago

0.2.0-beta.17

5 months ago

0.2.0-beta.18

5 months ago

0.2.0-beta.2

8 months ago

0.2.0-beta.1

8 months ago

0.2.0-beta.0

8 months ago

0.2.0-beta.6

6 months ago

0.2.0-beta.5

6 months ago

0.2.0-beta.4

6 months ago

0.2.0-beta.3

7 months ago

0.1.0

8 months ago

0.1.0-beta.21

9 months ago

0.2.0-beta.8

6 months ago

0.1.0-beta.23

8 months ago

0.2.0-beta.7

6 months ago

0.1.0-beta.22

9 months ago

0.1.0-beta.25

8 months ago

0.1.0-beta.24

8 months ago

0.1.0-beta.26

8 months ago

0.1.0-beta.20

11 months ago

0.1.0-beta.19

11 months ago

0.1.0-beta.18

11 months ago

0.1.0-beta.17

11 months ago

0.1.0-beta.14

11 months ago

0.1.0-beta.13

11 months ago

0.1.0-beta.16

11 months ago

0.1.0-beta.15

11 months ago

0.1.0-beta.12

12 months ago

0.1.0-beta.11

12 months ago

0.1.0-beta.3

1 year ago

0.1.0-beta.2

1 year ago

0.1.0-beta.4

1 year ago

0.1.0-beta.1

1 year ago

0.1.0-beta.0

1 year ago

0.0.2-beta.2

1 year ago

0.0.2-beta.1

1 year ago

0.0.2-beta.0

1 year ago