Both of these options aim for a relatively general description. This time I’m going to disagree with community votes again. Some of the reasons why people voted for them were that they were not too prescriptive, and that they leave developers with enough room to come up with the right solutions. Or we can keep it easy to understand and relevant, but the tests would not be reliable.Īmong the options offered in the original challenge, “Specify overall process properties” and “Test properties of a larger set” were the only options to get votes, and they got an equal number. We can make the test very specific, but then it may not be that relevant for the whole purpose. The most difficult part of solving these kinds of problems is balancing specificity, reliability and relevance. Last time, you voted for options to describe a process that involved randomness. Then the folling pauses should be be inserted after: Given the random number generator produces the following sequence: 0.9, 0.4, 0.1, 0, 0.6 This would not prove end-to-end integration, but it would prove that we’re transforming the random number output (usually between 0 and 1) to the interval required by the scenario (0.2s to 0.5s). In production, the system would use an actual random number generator. Then the minimum delay between typing should be greater than 0.2 secondsĪnd the maximum delay between typing should be less than 0.5 secondsĪnd there should be at least 1000 unique delay values Option 4: Fake the randomness for automationĪlternatively, we could make the process deterministic by providing a “fake” random number generator for testing purposes. We could try specifying that instead of individual instances: Given the bot receives 10000 messages Then the pause between typing H and e should be random between 0.2 and 0.5 secondsĪnd the pause between typing e and l should be random between 0.2 and 0.5 secondsĪnd the pause between typing l and l should be random between 0.2 and 0.5 secondsĪnd the pause between typing l and o should be random between 0.2 and 0.5 seconds Option 3: Test properties of a larger setĪlthough there’s no clear deterministic value for each individual action, non-deterministic processes may have some deterministic properties when applied to a large group. Given the bot receives a message "Hi there" Then the bot should insert random pauses from 0.2 to 0.5 seconds between each letter Option 2: specify randomness in individual actions explicitlyĪlternatively, we could expose more information in the scenario, and leave individual actions to prove for the automation layer. One option would be to directly translate business expectations into a single statement, and hide the details of the test in the automation layer. Option 1: Specify overall process properties
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |