Reputation: 11
I am writing test cases for a device testing in which I will have to check some Wifi, Messaging, Camera and Audio Apis but only if the device is capable of that Feature
Example :
@Test
public void testMessagingApi() throws Exception {
....some test method....
}
But this Test method should execute only if my device is capable of Messaging feature
public boolean isCapable(String feature) {
Check some property to test if the feature is supported
return supported;
}
The test should execute only if isCapable returns true else it should be ignored or skipped
How to write such a test class
Please someone help
Upvotes: 0
Views: 563
Reputation: 21
And if you change 2 + 2 to 1 + 1, does it fail? (Cound not comment above, not enough reputation ;)
Upvotes: 0