Using Selenium in Visual Studio. Using NUnit to sort my testcases.
I'm writing a testcase that compares two serialnumbers with a if statement like this:
[Test]
public void CompareVariables()
{
if (string.Equals(serialNumberInfo, serialNumberReport))
Console.WriteLine($"{serialNumberInfo} and {serialNumberReport} are a match! Proceed!");
else
Console.WriteLine($"{serialNumberInfo} and {serialNumberReport} don't match! Cancel test!");
//method for aborting test missing!
I want to be able to abort the rest of the testsequence if the serialnumbers don't match.
Is there a "end/abort test" method or something similar I could put in else section?
Aucun commentaire:
Enregistrer un commentaire