There is ambiguity in all papers I have read so I would like to ask about the following requirement:Requirement: Being a Game master, I can access the GM menu by typing menuInvoke.Trying to do that as a regular player - is that a negative test or still positive in terms of verifying the requirement? Because some authors say negative testing means dealing with inputs unknown to specification, which would not be this case as the spec does say you need to be a Game master, implying it is not allowed for the other ones. However if you think like that, it is always implicit: range 1-1000 implies that nothing else can be entered, yet we test it as a negative test.An example of ambiguity:Login system. Some say that providing incorrect password to receive Login error is negative test but I agree with the others - it is plain positive test as the requirement definitely specifies that only a user with valid password can login.
Test case design - do for all positive tests exist also negative ones?
testing;theory
Look at your SUT as a function mapping values from a set D to values from a set V. As these values may be tupels as well, this view is valid for any function.If you enter values from D into your function and test the result, it is a positive test. It may succeed (by getting the appropriate value from V) or fail (in any other case).If you enter value, which is not from D, into your function and test the result, it is a negative test. It may succeed (by getting an error message) or fail (in any other case).With these definitions (see Shivprasad Koirala. Sham Sheikh: Software Testing Interview Questions), a case can be constructed, where every possible input is valid. Think of a boolean function determining whether the input is an integer or not. Thus, the answer to the question Do for all positive tests exist also negative ones? clearly is: No.For your example requirement, the function is probablyf: UserType X Command -> ActionIn this case, both ('GameMaster', 'menuInvoke') and ('RegularPlayer', 'menuInvoke') are valid inputs, so the both test cases are positive tests.On the other hand, it could be defined asf: 'GameMaster' X Command -> ActionIn this case, the tupel ('RegularPlayer', 'menuInvoke') is not a valid input, and testing this case would be a negative test.Since your requirement does not contain the information needed to determine the kind of function, there is no general answer to the question regarding this requirement. This ambiguosity may be the reason, why examples in the literature either are so simple or contradicting.