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: docs/test-plan.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,58 @@ choose to go through some of the Optional Test Cases.
18
18
19
19
## Required Test Cases
20
20
21
+
### Local databases
22
+
23
+
#### Test case 1: Download a database from GitHub
24
+
25
+
1. Click "Download Database from GitHub" and enter `angular-cn/ng-nice` and select the javascript language if prompted
26
+
27
+
#### Test case 2: Import a database from an archive
28
+
29
+
1. Obtain a javascript database for `babel/babel`
30
+
- You can do `gh api "/repos/babel/babel/code-scanning/codeql/databases/javascript" -H "Accept: application/zip" > babel.zip` to fetch a database from GitHub.
31
+
2. Click "Choose Database from Archive" and select the file you just downloaded above.
32
+
33
+
### Local queries
34
+
35
+
#### Test case 1: Running a path problem query and viewing results
36
+
37
+
1. Open the [javascript UnsafeJQueryPlugin query](https://github.com/github/codeql/blob/main/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql).
38
+
2. Select the `angular-cn/ng-nice` database (or download it if you don't have one already)
39
+
3. Run a local query.
40
+
4. Once the query completes:
41
+
- Check that the result messages are rendered
42
+
- Check that the paths can be opened and paths are rendered correctly
43
+
- Check that alert locations can be clicked on
44
+
45
+
#### Test case 2: Running a problem query and viewing results
46
+
47
+
1. Open the [javascript UnsafeJQueryPlugin query](https://github.com/github/codeql/blob/main/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql).
48
+
2. Select the `babel/babel` database (or download it if you don't have one already)
49
+
3. Run a local query.
50
+
4. Once the query completes:
51
+
- Check that the result messages are rendered
52
+
- Check that alert locations can be clicked on
53
+
54
+
#### Test case 3: Running a non-probem query and viewing results
55
+
56
+
1. Open the [cpp FunLinesOfCode query](https://github.com/github/codeql/blob/main/cpp/ql/src/Metrics/Functions/FunLinesOfCode.ql).
57
+
2. Select the `google/brotli` database (or download it if you don't have one already)
58
+
3. Run a local query.
59
+
4. Once the query completes:
60
+
- Check that the results table is rendered
61
+
- Check that alert locations can be clicked on
62
+
63
+
#### Test case 3: Can use AST viewer
64
+
65
+
1. Click on any code location from a previous query to open a source file from a database
66
+
2. Open the AST viewing panel and click "View AST"
67
+
3. Once the AST is computed:
68
+
- Check that it can be navigated
69
+
21
70
### MRVA
22
71
23
-
#### Test Case 1: Running a problem path query and viewing results
72
+
#### Test Case 1: Running a path problem query and viewing results
24
73
25
74
1. Open the [javascript UnsafeJQueryPlugin query](https://github.com/github/codeql/blob/main/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql).
0 commit comments