I am studying CS61B by myself. I was confused about Randomized testing. It is cited form proj1b spec: "The autograder project 1A largely relies on randomized tests. For example, our JUnit tests on gradescope simply call random methods of your LinkedListDeque class and our correct implementation LinkedListDequeSolution and as soon as we see any disagreement, the test fails and prints out a sequence of operations that caused the failure. "(http://ift.tt/2vq1Fng)
I do not understand what it means "call random methods of the tested class and the correct class. I need to write something really similar with that autograder. But I do not know if I need to write tests for different methods together by using a loop to random pick up some to test? ( if so, we can test all methods by using JUnit, why we need to randomized test? Also, if I combine all the tests together, why I call it JUnit? ) If you do not mind, some examples will be easier to understand.
Thanks for reading~
Aucun commentaire:
Enregistrer un commentaire