We use Selenium webdriver + SpecFlow for testing our Web application.

For some functionality, everything is clear. But imagine the situation: some questions arrive to Web user from external system he may answer. The test should "test" if the user can see those questions in appropriate view and successfully submit some or all answers. If there are no questions for the given user - section "New questions" is not displayed on the Web site.

So I am stuck with the following: how to make the situation "There is nothing to test" NOT a failure or success, but to just stop the test and return "ignore" status? I may add, that there might be tons of tests for whole system and it looks very difficult to sort them manually somehow (marking as "ignore" in advance).

  • The test should be setup so that the "new answers" does show
    – Ewan
    Feb 21, 2018 at 15:38
  • Unfortunately, the questions are sent from external system - we cannot affect this. OK, so it's all sad - the test cannot be made as "smart" as i expected...
    – Alexander
    Feb 21, 2018 at 16:49
  • 2
    mock the external system
    – Ewan
    Feb 21, 2018 at 16:51
  • Agree, theoretically - could be. But in our case it's just another pretty big layer of complexity: the systems are not ready to mocking at all and no time will be allocated to this... So seems like this is the case where automatic web UI testing will give up in favor of manual testing... :)
    – Alexander
    Feb 21, 2018 at 17:25
  • Test for "New questions" not being displayed. stackoverflow.com/questions/12270092 Feb 21, 2018 at 18:56

2 Answers 2


The preferred situation is that you mock the external system and then create two tests: one to verify the behavior when there are questions to be shown and another to verify the behavior when there are no questions.

If mocking the external system is not possible, then you might compromise and create one testcase that tests both scenarios. Just make it sure that it is clear what scenario was active when the test fails.


Assert.Inconclusive is what I need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.