BDD with Manual Tests?
Asked Answered
T

7

7

We are switching from a classic 'Waterfall' model into more Agile-orient philosophy. We decided to give BDD a try (Cucumber), but we have some issues with migrating some of our 'old' methodologies. The biggest question mark is how manual tests integrates into the cycle.

Let's say the Project Manager defined the Feature and some basic Scenario Outlines. With the test team, we defined around 40 Scenarios for this feature. Some are not possible to automatically test, which means they will have to be tested manually. Execute manual testing when all you have is the feature file, feels wrong. We want to be able to see past failure rate of tests for example. Most of the Test-Cases managers support such features, but they can't work with Feature files. Maintaining the Manual Testcases in external Test-Case manager, will cause never-ending updating issues between the Feature file and the Test-Case manager.

I'm interested to hear if anyone is able to cover this 'mid-ground' and how.

Thurifer answered 2/3, 2015 at 14:41 Comment(4)
Why is it not possible to test them automatically? There's a lot of testing tools out there and it may be that you simply aren't aware of something that will do what you're after.Alicaalicante
For example, we don't have enough man-power to automate them all in one cycle (which means will automated some now and some in the next cycle), or we figured out some tests are very UI oriented are require a person to verify them properly. Manual test execution is happening in a perfect BDD environment? or only debugging of failed automation tests?Thurifer
So essentially you're in the process of transitioning to automated tests? For tests that at this point require human judgement, how about just taking screenshots at certain stages of the process? I know you can do that with Splinter, and I wouldn't be surprised if other browser automation libraries can do so too. Someone can then go through these screenshots to check them. Or maybe Wraith might do what you're after.Alicaalicante
@MatthewDaly, Taking a screenshots is a good option, the problem is that we going to have few "Passed" test-cases (as Screenshots were successfully takes and Cucumber is done what he meant to do), but then the testers have to check the Screenshots and maybe fail the test. This will cause again manual update step between the phase (the Manual tester need to somehow mark the Cucumber test as failure and track is on external tool).Thurifer
A
5

This is not a very unusual case. Even in Agile it may not be possible to automate every scenario. The scrum teams I am working with usually tag them as @manual scenario in the feature file. We have configured our automation suite (Cucumber - Ruby) to ignore these tags while running nightly jobs. One problem with this is, as you have mentioned, we won't know what was the outcome of manual tests as the testers document the results locally.

My suggestion for this was to document the results of each iteration in a YML or any other file format that suits the purpose. This file should be part of the automation suite and should be checked in the repository. So to start with you have results documented along with the automation suite. Later when you have the resource and time, you can add a functionality to your automation suite to read this file and generate a report either with other automation results or separately. Until then your version control should help you to track all previous results.

Hope this helps.

Arcturus answered 2/3, 2015 at 20:0 Comment(1)
Thanks @Eswar. So that's basically the approach we are aiming for. We have a Test-Case manager we use here, so I'm guessing a better option for us to to save iteration results in it.Thurifer
W
5

To add to @Eswar's answer, if you're using Cucumber (or one of it's siblings), one option would be to execute the test runner manually and include prompts for the tester to check certain aspects. They then pass/fail the test according to their judgement.

This is often useful for aesthetic aspects e.g. cross-browser rendering, element alignment, correct images used, etc.

As @Eswar mentioned, you can exclude these tests from your automated runs by tagging them.

See this article for an example.

Wyn answered 3/3, 2015 at 0:40 Comment(3)
It's a good suggestion, but if you have to run you test suites in a build system (no human involved) it may not be as useful.Reamy
Thanks for the answer Matt. As @Reamy mentioned, we run the tests in a build system. But thanks for the link, I will see what cucumbumbler can do.Thurifer
Well, if you need a fully automated test suite, by definition you can't have any manual tests... If you require manual tests, you need a human to run them. Cucumber can meet you half-way and still allow you to record the results and produce reports etc.Wyn
R
1

Test cases that cannot be automated are a poor fit for a cucumber test. We have a bunch of these edge cases. It is nigh impossible to get Selenium to verify PDF documents well. Same thing for CSV downloads (not impossible, but not worth the effort). Look and feel tests simply require human eyes at this point. Accessibility testing with screen readers is best done manually as well.

For that, be sure to record the acceptance criteria in the user story in whichever tool you use to track work items. Write a manual test case. The likes of Azure DevOps, Jira, IBM Rational Team Concert and their ilk have ways to record manual test plans, link them to stories, and record the results of executing a manual test.

I would remove the manual test cases from the cucumber tests, and rely on the acceptance criteria for the story, and link the story to some sort of manual test case, be it in a tool or a spreadsheet.

Sometimes you just need to compromise.

Rea answered 16/10, 2020 at 18:2 Comment(0)
E
1

We use Azure DevOps with Test Plans + some custom code to synchronize cucumber tests to ADO. I can describe how we’ve realized it in our projects:

  • We start with the cucumber file first. Each User Story has its own Feature file. The scenarios in the Feature are the acceptance criteria for the story. We end up with lots of Feature files, so we use naming conventions and folders to organize them.
  • We annotate the top of the Feature file with a tag to the User Story, eg @Story-1234
  • We‘ve written a command line utility that reads the cucumber files with these tags. It then fetches all the Test Suites in the Test Plan that are linked to Stories. In ADO, a story can only be linked to a single test suite. If a Test Suite doesn’t exist for that Story, our tool creates one.
  • For each Scenario, the tool creates a an ADO Test Case and then annotates the Scenario with the Test Case ID. This creates amazing traceability for each User Story as the related Test Cases are automatically linked to the Story in the Azure DevOps UI
  • Although we don’t do this, we could populate the TestCase with the step definitions from our cucumber Scenario. It’s a basic XML structure that describes the steps to take. This would be useful if we wanted to manually execute the test case using the Azure DevOps Test Case UI. Since we focus primarily on automation, we rely on the steps in our Feature files and our ADO Test Cases end up being symbolic links back to cucumber Scenarios.
  • Because our cucumber tests are written in C# (SpecFlow), we can get the full class name and method for the cucumber test code. Our tool is able to update the Azure DevOps Test Case with the automation details.
  • Any test case that isn’t ready for automation or must be done manually, we annotate the Scenario with a @ignore or @manual tag.
  • Using Azure DevOps Pipelines, we use the Visual Studio Test task to run our tests. The important point here is we execute the Test Plan option. This option fetches the Test Cases in the Test Plan that have automation and then executes the specific cucumber tests. The out-of-the-box functionally updates the Test Case statuses with the test results.
  • After running through automation, we use the Test Plan Report in Azure DevOps which shows the Test Case execution status over time and can distinguish between test automated and manual test cases.
  • We execute any remaining manual test cases to complete the Test Plan
Encarnacion answered 17/10, 2020 at 16:17 Comment(0)
R
0

For us, we often found that the manual cases that cannot be automated are exception cases, or cases that depend on external environment (for example malformed data, network connection not available, maintenance, first time guide...). These cases require special setup to simulate the environment when they happen.

Ideally, I believe it is possible to cover everything, given that you are prepared to go as far as you can to make it happen. But in reality, it is most often too much an effort needed that we prefer the hybrid approach of mixed manual-automatic test cases. We do, however, try to convert those exception cases over the time to automatic ones, by setting up separate environment to simulate exception cases and write automation tests against them.

Nevertheless, even with that effort, there would be cases when it's impossible to simulate, and I believe they should be covered by technical tests from engineers.

Reamy answered 3/3, 2015 at 0:29 Comment(3)
Thanks for the answer hidro. What do you do with those Manual Tests? BDD require everything to be in the feature file. So you track them in the Feature file and mark the results where?Thurifer
We create the scenario (some time with just a dummy step, sometimes full steps), but mark the steps as pending, so that in the future when we're ready we'll clear the pending ones. Same way you comment code with // TODOReamy
For the results, it's just a convention, we note down things that need to test manually, and go through them before major deployments. For daily development we skip them (may not be the best practice)Reamy
D
0

You could use an approach similar to the following example: http://concordion.org/Example.html

When you use a build or continuous integration system to track your test runs, you could add simple specifications / tests for your manual cases that contain a text comparison (e.g. "pass" or "fail"). Then you would need to update the spec after each manual test run, check it in, and start the tests in your build / continuous Integration system. Then the manual results would be recorded together with the results of the automated test execution.

If you would use a tool like Concordion+ (https://code.google.com/p/concordion-plus/) you could even write a summary specification, which could contain scenarios for each of your manual tests. Each one would be reported as individual test result in your test execution environment.

Cheers

Darlleen answered 3/3, 2015 at 17:20 Comment(0)
H
0

taking screen shots seems to be a good idea, you can still automate the verification but will need to go an extra mile. for instance when using Selenium you can add Sikuli(NB: u can't run headless test) to compare results (images) or take a screenshot with Robot (java.awt) use OCR to read text and assert or verify(TestNG)

Hurleigh answered 13/6, 2019 at 8:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.