Skip to content

Commit 531f32c

Browse files
committed
Expand query results scenarios based on variant analysis state
1 parent 1b76159 commit 531f32c

1 file changed

Lines changed: 87 additions & 58 deletions

File tree

extensions/ql-vscode/docs/test-plan.md

Lines changed: 87 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -123,67 +123,96 @@ These are mostly aimed at MRVA, but some of them are also applicable to non-MRVA
123123
2. The org does not exist
124124

125125
### Using different types of controller repos
126-
1. The controller is public
127-
1. Can run queries on public repositories
128-
2. Can not run queries on private repositories
129-
2. The controller is private
130-
1. Can run queries on public repositories
131-
2. Can run queries on private repositories
132-
3. The controller repo exists but you do not have write access
133-
4. The controller repo doesn’t exist
134-
5. The "config field" for the controller repo is not set
126+
127+
#### Test case 1: Running a query when the controller repository is public
128+
1. Can run queries on public repositories
129+
2. Can not run queries on private repositories
130+
131+
#### Test case 2: Running a query when the controller repository is private
132+
1. Can run queries on public repositories
133+
2. Can run queries on private repositories
134+
135+
#### Test case 3: Running a query when the controller repo exists but you do not have write access
136+
1. Cannot run queries
137+
138+
#### Test case 4: Running a query when the controller repo doesn’t exist
139+
1. Cannot run queries
140+
141+
#### Test case 5: Running a query when the "config field" for the controller repo is not set
142+
1. Cannot run queries
135143

136144
### Query History
137-
1. Query history is loaded when vscode starts
138-
- Handles when action workflow was cancelled while vscode was closed
139-
- Starts monitoring variant analyses
140-
- When variant analysis state is "pending"
141-
- When variant analysis state is "in_progress"
142-
- When variant analysis state is "succeded"
143-
- All results are downloaded
144-
- Not all results are downloaded
145-
- When variant analysis state is "failed"
146-
- Stops monitoring
147-
2. Can open query history item
148-
- Manually by clicking on them
149-
- Automatically when vscode starts (if they were open when vscode was last used)
145+
146+
This requires running a MRVA query and viewing the query history.
147+
148+
The first test case specifies actions that you can do when the query is first run and is in "pending" state. We start
149+
with this since it has quite a limited number of actions you can do.
150+
151+
#### Test case 1: When variant analysis state is "pending"
152+
1. Starts monitoring variant analysis
153+
2. Cannot open query history item
150154
3. Can delete a query history item
151-
- Item is removed from list in UI
152-
- Files on dist are deleted (can get to files using "open query directory")
155+
1. Item is removed from list in UI
156+
2. Files on dist are deleted (can get to files using "open query directory")
153157
4. Can sort query history items
154-
- By name
155-
- By query date
156-
- By result count
157-
5. Can open query directory
158-
6. Can open query that produced these results
159-
- When the file still exists and has not moved
160-
- When the file does not exist
161-
7. Can open variant analysis on github
162-
- Option is not shown before an actions run has been scheduled
163-
- Option is shown when an actions run has been scheduled
164-
8. Can copy repository list
165-
- Option is not shown before all analyses have finished
166-
- Option is shown once all analyses are finished
167-
- Text is copied to clipboard
168-
- Text is a valid repository list
169-
9. Can export results
170-
- Option is not shown before all analyses have finished
171-
- Option is shown once all analyses are finished
172-
10. Can select to create gist
173-
- A gist is created
174-
- The first thing in the gist is a summary
175-
- Contains a file for each repository with results
176-
- A popup links you to the gist
177-
11. Can select to save as markdown
178-
- A directory is created on disk
179-
- Contains a summary file
180-
- Contains a file for each repository with results
181-
- A popup allows you to open the directory
182-
12. Can cancel analysis
183-
- Option is shown when analysis is in progress
184-
- Option is not shown once all analyses are finished
185-
- Option is not shown before action run has been started
186-
- Causes the actions run to be cancelled
158+
1. By name
159+
2. By query date
160+
3. By result count
161+
5. Cannot open query directory
162+
6. Can open query that produced these results
163+
1. When the file still exists and has not moved
164+
2. When the file does not exist
165+
7. Cannot open variant analysis on github
166+
8. Cannot copy repository list
167+
9. Cannot export results
168+
10. Cannot select to create a gist
169+
11. Cannot select to save as markdown
170+
12. Cannot cancel analysis
171+
172+
#### Test case 2: When the variant analysis state is not "pending"
173+
1. Query history is loaded when VSCode starts
174+
2. Handles when action workflow was cancelled while VSCode was closed
175+
3. Can open query history item
176+
1. Manually by clicking on them
177+
2. Automatically when VSCode starts (if they were open when VSCode was last used)
178+
4. Can delete a query history item
179+
1. Item is removed from list in UI
180+
2. Files on dist are deleted (can get to files using "open query directory")
181+
5. Can sort query history items
182+
1. By name
183+
2. By query date
184+
3. By result count
185+
6. Can open query directory
186+
7. Can open query that produced these results
187+
1. When the file still exists and has not moved
188+
2. When the file does not exist
189+
8. Can open variant analysis on github
190+
9. Can copy repository list
191+
1. Text is copied to clipboard
192+
2. Text is a valid repository list
193+
10. Can export results
194+
11. Can select to create gist
195+
1. A gist is created
196+
2. The first thing in the gist is a summary
197+
3. Contains a file for each repository with results
198+
4. A popup links you to the gist
199+
12. Can select to save as markdown
200+
1. A directory is created on disk
201+
2. Contains a summary file
202+
3. Contains a file for each repository with results
203+
4. A popup allows you to open the directory
204+
205+
#### Test case 3: When variant analysis state is "in_progress"
206+
1. Starts monitoring variant analysis
207+
1. Ready results are downloaded
208+
2. Can cancel analysis
209+
1. Causes the actions run to be cancelled
210+
211+
#### Test case 4: When variant analysis state is in final state ("succeeded"/"failed"/"canceled")
212+
1. Stops monitoring variant analysis
213+
1. All results are downloaded if state is succeeded
214+
2. Otherwise, ready results are downloaded, if any are available
215+
2. Cannot cancel analysis
187216

188217
### Results view
189218
1. Can open a results view
@@ -194,7 +223,7 @@ These are mostly aimed at MRVA, but some of them are also applicable to non-MRVA
194223
- When variant analysis state is "canceled"
195224
2. Results view opens automatically
196225
- When starting variant analysis run
197-
- When vscode opens (if view was open when vscode was closed)
226+
- When VSCode opens (if view was open when VSCode was closed)
198227
3. Can copy repository list
199228
See section from query history.
200229
4. Can export results

0 commit comments

Comments
 (0)