perseus14's blog

By perseus14, history, 6 years ago, In English

Are the testcases used for evaluation manually generated by humans or is it generated by some sort of automated testcase generator?

  • Vote: I like it
  • +4
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it +51 Vote: I do not like it

Authors prepare some small handcrafted tests and they implement generators to create more tests. I'm not sure what you mean by "automated" here. Nobody writes thousands of numbers by hand. And there are no universal generators that would automatically give you tests for any problem.

»
6 years ago, # |
  Vote: I like it +16 Vote: I do not like it

There are majorly three type of test cases according to me. One:- Edge Cases ( Corner Cases ) Second:- Simple cases Third:- Cases satisfy the highest constraint given in the question.

Each has its own agenda. The third type of test cases is used to verify complexity of the code. If it can pass for highest given constraint. Like, suppose there is a dynamic programming question which needs to solve in O(n*n) and someone solve it using recursion. Those two solutions are differentiated by this type of cases. These are generated using some automated program in a specific constraint as required in the problem. Secondly, Simple Cases are used to check the correctness of your code. Where is your code is giving the correct answer on given test cases or not. Generally, these are generated using both of above method as you mentioned. Now edge cases are generated manually. It is used to see if the participant considered the edge cases. Where the general solution won't work and they need to find out the answer using some other way. As mentioned they are generated manually.

I hope, I explained it well.