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
Currently, if you filter out any tests (e.g., by choosing a part of the lab or by only running search tests etc.), all of the tests are renumbered. This is because test numbers are assigned by JUnit after all of the filtering takes place. It would be much nicer to have a consistent numbering scheme. Test numbers should probably have "fully qualified" names, assigned by annotation. For example, the "number" of test 4 in part 2 would be "2.4" (a String rather than an int).
Then, from ./run-tests.py if --part is specified, individual tests can be selected without referring to the fully qualified name (i.e., you can specify --lab 1 --part 2 -n 4 or --lab 1 -n 2.4 but not lab 1 -n 4).
A complication is labs with only one part. Their test numbers shouldn't be 1.1, 1.2 etc. but just 1, 2. And referring to tests this way in ./run-tests.py should be valid.
It would also be nice to sort tests based on the numbering annotation rather than method name. Test numbers could then be removed from method names. I'm not sure if this is possible with the version of JUnit we're using.
Once question is whether the annotation should have the fully qualified name, or a simple integer and pick up the part number from the test class. There are arguments for both approaches, but having the fully qualified name (e.g., @TestNumber("2.4")) is probably best because it allows students to easily look at the method and know how to run it.
Lastly, it would be great if we could validate in an automated test that test numbers are sequential, there are no duplicates, every test has a number, etc. This should go in the tst-self directory. https://github.com/emichael/dslabs/tree/master/framework/tst-self/
The text was updated successfully, but these errors were encountered:
Previously, when tests where filtered out the numbers of other tests
were recalculated. This commit assigns unique test numbers based on the
@part annotation (if present) and the test name itself.
This commit also adds the @Lab annotation and looks up tests suites and
viz configs based on their annotations by searching through the
classpath. This obviates the need for the uniquely-named classes in the
testsuites and vizconfigs packages.
Currently, if you filter out any tests (e.g., by choosing a part of the lab or by only running search tests etc.), all of the tests are renumbered. This is because test numbers are assigned by JUnit after all of the filtering takes place. It would be much nicer to have a consistent numbering scheme. Test numbers should probably have "fully qualified" names, assigned by annotation. For example, the "number" of test 4 in part 2 would be "2.4" (a
String
rather than anint
).Then, from
./run-tests.py
if--part
is specified, individual tests can be selected without referring to the fully qualified name (i.e., you can specify--lab 1 --part 2 -n 4
or--lab 1 -n 2.4
but notlab 1 -n 4
).A complication is labs with only one part. Their test numbers shouldn't be
1.1
,1.2
etc. but just1
,2
. And referring to tests this way in./run-tests.py
should be valid.It would also be nice to sort tests based on the numbering annotation rather than method name. Test numbers could then be removed from method names. I'm not sure if this is possible with the version of JUnit we're using.
Once question is whether the annotation should have the fully qualified name, or a simple integer and pick up the part number from the test class. There are arguments for both approaches, but having the fully qualified name (e.g.,
@TestNumber("2.4")
) is probably best because it allows students to easily look at the method and know how to run it.Lastly, it would be great if we could validate in an automated test that test numbers are sequential, there are no duplicates, every test has a number, etc. This should go in the tst-self directory.
https://github.com/emichael/dslabs/tree/master/framework/tst-self/
The text was updated successfully, but these errors were encountered: