Test case design – do for all positive tests exist also negative ones?

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.

5

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 probably

f: UserType X Command -> Action

In 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 as

f: 'GameMaster' X Command -> Action

In 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.

4

Positive Testing: To test the positive flow or happy flow of the application. Here the user’s intention is to navigate to sunsequesnt screen or functionality without facing any error messages.
Negative Testing: To test the invalid data handling, error messages verification.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật