xref: /aosp_15_r20/external/licenseclassifier/v2/scenarios/README.md (revision 46c4c49da23cae783fa41bf46525a6505638499a)
1# Scenarios
2
3Test scenarios are files with a predefined structure for running tests.
4
5A scenario should have some text describing what is being tested and why.
6Following the description, the keyword EXPECTED followed by a colon and a
7comma-separated list of expected licenses should appear, concluding with an
8endline. All remaining content in the file is passed as input to the classifier.
9
10Filenames are generally the Buganizer id, suffixed with an underscore and
11numbers if there are multiple scenarios necessary for a bug.
12
13As an example:
14
15```
16This is a simple license header that we did not previously detect due
17to b/12345
18EXPECTED:ISC
19<code content goes here>
20```
21
22Scenarios should not be encumbered by license restrictions, so it's essential to
23create a minimal reproduction that doesn't rely on licensed code.
24