S
S
SaveAPrayer2017-03-02 12:41:42
Software testing
SaveAPrayer, 2017-03-02 12:41:42

How to write test cases for functions?

There is a program function: int test_function(String A, Boolean B)
It is necessary to compose a set of hypothetical test scenarios for future unit testing for it
. There is no input specific data, only the provided function must be used for consideration.
Please explain how to write such test cases. (preferably in detail, so that it even reaches the vegetable)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-03-02
@SaveAPrayer

Without what she does, there is no way we can write the necessary scripts.
For example, we are testing the function abs(x) - to check its performance, it is enough to give something positive, something negative and zero to the input.
For example, abs(2) = 2, abs(−3) = 3, abs(0) = 0.
For your example, you need to check B = true and B = false - and the jester knows the rest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question