Writing Sample Tests
Sample tests are part of every challenge, they are important for both creators and users. Sample tests that are not correct can represent a problem in solving a challenge. You can make sure that your sample tests are as good as they can be, by following the guidelines collected below.
Every material counts! Take a look at General Coding Guidelines, to make sure you follow the required standards exactly as any other provided code.
The sample tests are not a description of the challenge! Users must be able to understand what they have to do from the description, sample tests should only be extra help for them.
Better not! Try to avoid the phrase "sample tests" in the sample test descriptions. It’s impossible for the user to figure out the input and output details from the test description. An example of a good description is sum (8, 10) should be equal to 18.
Keep the content! The sample test should include the examples you write in the description.
Keep it clean! Try to write organized code, splitting the tests into groups and subgroups.
TIP
- Offering more sample tests can increase user satisfaction in solving challenges.
- Try not to leave the challenge without a couple of sample tests.