You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/flakeguard/README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,41 @@ Flakeguard offers two main commands:
24
24
25
25
-`find` identifies test packages affected by recent changes.
26
26
-`run` executes tests multiple times to identify flaky tests
27
+
-`create-tickets` automates the creation of Jira tickets for flaky tests detected by Flakeguard
27
28
28
29
Run with `--help` to see all flags for the commands.
29
30
30
31
### JSON Output
31
32
32
33
Both `find` and `run` commands support JSON output `--json`, making it easy to integrate Flakeguard with CI/CD pipelines and reporting tools.
33
34
35
+
### Creating JIRA Tickets
36
+
The `create-tickets` command allows you to automate the creation of JIRA tickets for flaky tests. It reads test results from a CSV file (typically exported from a Splunk view) and creates tickets in JIRA.
37
+
38
+
```
39
+
go run main.go create-tickets --jira-project=<JIRA_PROJECT_KEY> --flaky-test-json-db-path=<PATH_TO_FLAKY_TEST_DB_JSON> --assignee-mapping=<PATH_TO_JIRA_ASSIGNEE_MAPPING_JSON> --csv-path=<PATH_TO_CSV_FILE> [--skip-existing] [--dry-run]
40
+
```
41
+
42
+
Example:
43
+
```
44
+
go run main.go create-tickets --jira-project=DX --flaky-test-json-db-path=.flaky_test_db.json --assignee-mapping=.jira_assignee_mapping.json --skip-existing --csv-path '1742825894_77903.csv'
45
+
```
46
+
47
+
**Options:**
48
+
49
+
-`--jira-project`: The JIRA project key where tickets should be created (e.g., `DX`).
50
+
-`--flaky-test-json-db-path`: The path to a JSON database (`.json`) that stores information about existing flaky test tickets.
51
+
-`--assignee-mapping`: The path to a JSON file (`.json`) that maps test packages to JIRA assignees.
52
+
-`--csv-path`: The path to the CSV file containing the flaky test results.
53
+
-`--skip-existing`: (Optional) Skips creating tickets for tests that already have corresponding JIRA tickets in the database or JIRA.
54
+
-`--dry-run`: (Optional) Performs a dry run without actually creating JIRA tickets.
55
+
56
+
**Environment Variables:**
57
+
58
+
-`JIRA_DOMAIN`: The domain of your JIRA instance.
59
+
-`JIRA_EMAIL`: The email address used to authenticate with JIRA.
60
+
-`JIRA_API_KEY`: The API key used to authenticate with JIRA.
0 commit comments