Monday, April 8, 2019

Annotations and Attributes of Testing Frameworks




We will discuss about frequently used ones to run test scenarious properly. You would find comparisons of NUnitMSTestxUnit.net and JUnit testing frameworks down below.
NUnitMSTestxUnit.netJUnitDescription
[TestFixture]
[TestClass]Indicates that the class has test methods.
[Test][TestMethod][Fact]@TestMarks a test case.
[OneTimeSetUp][ClassInitialize]IClassFixture@BeforeClassThe one time triggered method before test cases start.
[OneTimeTearDown][ClassCleanup]IClassFixture@AfterClassThe one time triggered method after test cases end.
[SetUp][TestInitialize]Constructor@BeforeTriggered before every test case.
[TearDown][TestCleanup]IDisposable.Dispose@AfterTriggered after every test case.
[Ignore][Ignore][Fact(Skip=”reason”)]@IgnoreIgnores the test case.
[Category(“”)][TestCategory(“”)][Trait(“Category”, “”)]@Category(*.class)Categorizes the test cases or classes.
There is a little difference between them except that the xUnit framework. xUnit prefers inheritance for the ones that it 

No comments:

Post a Comment