I've written some test cases, but the only thing I know is the format of a table (with the expected results, actual results, pass/fail etc). Is there any standard formats available for test cases?
-
The format is usually given to you by the tools you are using.– ne2dmarMar 7, 2018 at 11:19
3 Answers
There are many forms how test cases can be written in, one popular format is the Gherkins syntax:
Scenario: Some determinable business situation
Given some precondition
And some other precondition
When some action by the actor
And some other action
And yet another action
Then some testable outcome is achieved
And something else we can check happens too
It is more business friendly, for more information, please click Gherkin.
-
I've just wondered if Gherkins syntax is applicable for NUnit environment. Thanks anyway– ShayMar 3, 2018 at 6:13
I would look into Junit, Xunit and NUnit
XUnit is the family name given to bunch of testing frameworks that have become widely known amongst software developers. The name is a derivation of JUnit, the first of these to be widely known.
Check more details at martinfowler.
-
Thanks! I'm using NUnit for a plenty of time, and also found it very useful– ShayMar 3, 2018 at 6:11
Specflow is Gherkin implementainion on C#, which generates tests methods written using NUnit, MSTest, xUnit among other available unit test providers. You could read this answer from stackoverflow.