Let's now build and test. The following commands can be used to build, launch the steps in the background, and run the Cucumber test cases with a wire protocol, respectively:
cmake --build buildbuild/RPNCalculator/RPNCalculatorSteps &cucumber RPNCalculator
The following screenshot demonstrates the procedure of building and executing the Cucumber test case:
Great! Our test scenario is all green now! Let's move on to our next test scenario.
Let's add a scenario in the feature file to test the subtraction operation, as follows:
The test output looks as follows:
We had seen this before, hadn't we? I'm sure ...