An open API service indexing awesome lists of open source software.

https://github.com/jankaritech/expected-failures-updater


https://github.com/jankaritech/expected-failures-updater

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

## owncloud expected failure files updater
This is a tool that helps to update the expected failures file when you make changes on the feature files

### Usage
To use this tool run
```
go run main.go
```

### Available commands
- #### inspect
Check for any duplicate scenarios in your feature files

Required Env variables

- `FEATURES_PATH` Path where the Features files are

- #### cache
Read the Feature files and store their information

Required Env variables

- `FEATURES_PATH` Path where the Features files are

- #### shift
Update the expected Failure files

Required Env variables

- `FEATURES_PATH` Path where the Features files are
- `EXPECTED_FAILURES_DIR` Path were expected failures files are
- `EXPECTED_FAILURES_PREFIX` Prefix of the expected failure files in expectged failures dir (defaults to `expected-failures`)

- #### check-and
Replace subsequent Given, Given steps with Given, And

Required Env variables

- `FEATURES_PATH` Path where the Features files are

- #### scan
Check for newly added scenarios or deleted scenarios since last cache

Required Env variables

- `FEATURES_PATH` Path where the Features files are

### Instructions
- First check the .drone.env of the respective project to see the last version of testrunner used.
- Checkout to that version in the testrunner repo and cache the feature data with
```
FEATURES_PATH= go run main.go cache
```
- Now checkout to the latest version in the testrunner repo and rerun the command with
```
FEATURES_PATH= EXPECTED_FAILURES_DIR= go run main.go shift
```

### Run test
- Install Bats (Bash Automated Testing System) on your system using the following command:
```bash
sudo apt install bats
```
- After installing Bats, you can run your tests locally from the base directory of this project using the following command:
```bash
bats tests/*.bats
```