https://github.com/jankaritech/expected-failures-updater
https://github.com/jankaritech/expected-failures-updater
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jankaritech/expected-failures-updater
- Owner: JankariTech
- Created: 2021-03-25T05:07:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T07:46:03.000Z (almost 3 years ago)
- Last Synced: 2025-07-04T13:37:00.931Z (about 1 year ago)
- Language: Go
- Size: 44.9 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
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
```