Below is a sample test case which I wrote on my test suite.
In my project i need to be more focus on test reporting, so I thought in storing the test Pass / Failed status on SQL data table.
Then I can use some 3rd party tool to generate the report by referring to the SQL data table.
Any suggestions?
[TestMethod]
public void Validate_Availability_Of_Identity_Selector_Buttons()
{
string TestCaseName = "Validate Availability Of Identity Selector Buttons";
AvailabilityElm elm = new AvailabilityElm();
try
{
Assert.IsTrue(elm.IdentitySelectors.Displayed == true);
AddtoSQL(TestCaseName,"Pass","");
}
catch (Exception e)
{
AddtoSQL(TestCaseName,"Failed",e.ToString());
}
}
I have used Extended report in the past but I feel I need to add more lines of codes to the test steps if I'm moving with extender reports.
This is how my SQL table looks like :
command.CommandText = " INSERT INTO [dbo].[AUStagAdminPanelTestData]([TestcaseName],[Status],[Info])VALUES(@TestcaseName,@Status,@Info)";