Get started
Fast guide to jump into Autokin development
The best way to get started is to run examples and play around with it. Simply, in few minutes you have your working automated test.
Create an Autokin Project
To kickstart, let's start by creating a project folder.
mkdir my-autokin-projectName the folder anything that you see fit. Before proceeding to next step make sure that you are inside the new folder.
cd my-autokin-projectInstallation
Next, let's install autokin.
npm install autokinIt is assumed that you have your NodeJS environment setup. If you need more guidance on this, please see www.nodejs.org
Generate boilerplate project
Autokin comes with a very very simple boilerplate project, which comes with a single scenario where you can build your own on top of it. To generate the project, use the following command:
./node_modules/.bin/autokin --initThis will create the necessary folder structure and sample files.
my-autokin-project
├── features
| ├── support
| ├── steps.js
|
└── first.featureLet's run the test!
Running your first Autokin test
Now, you are ready to go. Run our Autokin test, just follow this command:
./node_modules/.bin/autokin --execThis will pickup all the Gherkin test with .feature extension file under the features folder. It should have the following output:
./node_modules/.bin/autokin -e
Autokin Test Run
Feature: My Feature > My First Scenario - ✔ Passed
Test Result Summary
┌────────────┬────────┬───────────┬───────┐
│ Features │ Result │ Scenarios │ Steps │
├────────────┼────────┼───────────┼───────┤
│ My Feature │ --- │ 1 │ 0 │
└────────────┴────────┴───────────┴───────┘
┌────────────────────────┬────────┬───────┬────────┬────────┬─────────┬─────────┬───────────┬─────────┐
│ Features / Scenarios │ Result │ Steps │ Passed │ Failed │ Skipped │ Pending │ Ambiguous │ Unknown │
├────────────────────────┴────────┴───────┴────────┴────────┴─────────┴─────────┴───────────┴─────────┤
│ My Feature │
├────────────────────────┬────────┬───────┬────────┬────────┬─────────┬─────────┬───────────┬─────────┤
│ My First Scenario │ --- │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │
└────────────────────────┴────────┴───────┴────────┴────────┴─────────┴─────────┴───────────┴─────────┘Runtime Options
| OPTIONS | SHORTKEY | DESCRIPTION |
|---|---|---|
--version | -V | Display version number |
--init | -i | Initialised new Autokin project structure |
--specs [path] | -s | Specify path location of features, --specs myfeatures |
--exec | -e | Execute automation test |
--tags [tags] | -t | Use with --exec to specify which tags to run, example:"@autokin" |
--junit | -j | Output additional result file in JUnit format |
--time | -d | Display duration execution for each steps |
--formatter [cucumber-formatter] | -f | Use with --exec to specify custom cucumber formatter |
--variable [file-path] | -v | Use with --exec to specify variable set from json file |
--html [file-path] | -w | Generate test result in html file format using Autokin HTML Formatter |
--help | -h | Output usage in console |
--clean | -c | Deletes existing reports and snapshots before running new test. |