# Get started

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.

### Before we start, Get Node!

Autokin works with NodeJS, and it must be installed first before anything. You can work with the latest or atleast v12. To install you can download from here and choose the correct package for your machine:[ https://nodejs.org/en/download/](https://nodejs.org/en/download/)

If you want to maintain cleanliness or organization of your Node versions, please use this version manager for Node: <https://github.com/nvm-sh/nvm>

You can follow installation instructions that can be found on both links. Once you have Node in your system, you can now proceed to the next steps. Enjoy!

### Create an Autokin Project <a href="#create-an-autokin-project" id="create-an-autokin-project"></a>

To kickstart, let's start by creating a project folder.

```
mkdir my-autokin-project
```

Name the folder anything that you see fit. Before proceeding to next step make sure that you are inside the new folder.

```
cd my-autokin-project
```

### &#x20;<a href="#installation" id="installation"></a>

### Installation <a href="#installation" id="installation"></a>

Next, let's install autokin.

```
npm install autokin
```

It is assumed that you have your NodeJS environment setup. If you need more guidance on this, please see [www.nodejs.org](http://www.nodejs.org)

### &#x20;<a href="#generate-boilerplate-project" id="generate-boilerplate-project"></a>

### Generate boilerplate project <a href="#generate-boilerplate-project" id="generate-boilerplate-project"></a>

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 --init
```

This will create the necessary folder structure and sample files.

```
   my-autokin-project
      ├── features
      |    ├── support
      |         ├── steps.js
      |
      └── first.feature
```

Let's run the test!

### &#x20;<a href="#running-your-first-autokin-test" id="running-your-first-autokin-test"></a>

### Running your first Autokin test <a href="#running-your-first-autokin-test" id="running-your-first-autokin-test"></a>

Now, you are ready to go. Run our Autokin test, just follow this command:

```
./node_modules/.bin/autokin --exec
```

This 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 │
└────────────────────────┴────────┴───────┴────────┴────────┴─────────┴─────────┴───────────┴─────────┘
```

### &#x20;<a href="#runtime-options" id="runtime-options"></a>

### Runtime Options <a href="#runtime-options" id="runtime-options"></a>

| 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.       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://autokin.gitbook.io/docs/get-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
