|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## How to test the basic functions of gtt |
| 4 | + |
| 5 | +Create a new project on GitLab if you haven't done so already and write down the project path. e.g. `kriskbx/example-project`. To test groups and subgroups, create a new group with at least one subgroup. Add a new project to both the parent group (e.g. `example-group`) and the subgroup (e.g. `example-group/example-subgroup`) and write down the paths of all the projects and groups. Create at least two issues (write down their id e.g. `42`, `43`) and one merge request (e.g. `13`) in all projects. Then run the following basic commands and check that they work as expected: |
| 6 | + |
| 7 | +``` |
| 8 | +# Test config command |
| 9 | +gtt config |
| 10 | +
|
| 11 | +# Test basic time tracking |
| 12 | +gtt start "kriskbx/example-project" 42 |
| 13 | +gtt stop |
| 14 | +gtt log |
| 15 | +
|
| 16 | +# Test cancelling |
| 17 | +gtt start "kriskbx/example-project" 42 |
| 18 | +gtt cancel |
| 19 | +gtt log |
| 20 | +
|
| 21 | +# Test merge request |
| 22 | +gtt start --type=merge_request "kriskbx/example-project" 13 |
| 23 | +gtt stop |
| 24 | +gtt log |
| 25 | +
|
| 26 | +# Test issue creation |
| 27 | +gtt create "krisbxkbx/example-project" "New Issue" |
| 28 | +gtt stop |
| 29 | +gtt log |
| 30 | +
|
| 31 | +# Test editing |
| 32 | +gtt edit |
| 33 | +
|
| 34 | +# Test deletion |
| 35 | +gtt start "kriskbx/example-project" 42 |
| 36 | +gtt stop |
| 37 | +gtt delete |
| 38 | +
|
| 39 | +# Test sync, check out issues on GitLab if changes are synced correctly |
| 40 | +gtt sync |
| 41 | +
|
| 42 | +# Test basic report |
| 43 | +gtt report "kriskbx/example-project" |
| 44 | +
|
| 45 | +# Test report for a single issue and multiple issues |
| 46 | +gtt report "kriskbx/example-project" 42 |
| 47 | +gtt report "kriskbx/example-project" 42 43 |
| 48 | +
|
| 49 | +# Test report for a group |
| 50 | +gtt report --type=group "example-group" |
| 51 | +gtt report --type=group --subgroups "example-group" |
| 52 | +
|
| 53 | +# Test combined reports |
| 54 | +gtt report "kriskbx/example-project" "example-group/example-project" |
| 55 | +
|
| 56 | +# Test outputs |
| 57 | +gtt report --output=table "kriskbx/example-project" |
| 58 | +gtt report --output=markdown "kriskbx/example-project" |
| 59 | +gtt report --output=csv "kriskbx/example-project" |
| 60 | +gtt report --output=pdf --file=test.pdf "kriskbx/example-project" |
| 61 | +gtt report --output=xlsx --file=test.xlsx "kriskbx/example-project" |
| 62 | +
|
| 63 | +# Test timeframes (adjust the values so it includes/excludes your issues) |
| 64 | +gtt report --from="2020-06-02" --to="2020-06-03" "kriskbx/example-project" |
| 65 | +
|
| 66 | +# Test filtering (you might need to add milestones, labels and additional stuff to properly test this) |
| 67 | +gtt report --closed "kriskbx/example-project" |
| 68 | +gtt report --user=username "kriskbx/example-project" |
| 69 | +gtt report --milestone=milestone_name "kriskbx/example-project" |
| 70 | +gtt report --include_by_labels=critical "kriskbx/example-project" |
| 71 | +gtt report --exclude_by_labels=ignore "kriskbx/example-project" |
| 72 | +gtt report --query=issues "kriskbx/example-project" |
| 73 | +``` |
0 commit comments