We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
How do I continue to the next item upon error?
Stop on error in the project properties = false
I've Tried the following for 'Stop on Error' for the Test Item to (same result - test ends):
function GeneralEvents_OnLogError(Sender, LogParams){
if(Project.Variables.EnableEmailNotification == true){
if(Project.TestItems.Current != null)
var body = "Test:" + Project.TestItems.Current.Name + "\r" + "Message: " + LogParams.MessageText + "\r" + "Additional Text:" + LogParams.AdditionalText;
else
var body = "Message: " + LogParams.MessageText + "\r" + "Additional Text:" + LogParams.AdditionalText;
SendMail(Project.Variables.MailRecipientList, "internalrelay.americas.swk.pri", "Automated Test (" + ProjectName() + ") Failed", "[email protected]", "Automated Test Failed (CMWeb)", body);
}
Runner.Stop(true);
}The Runner.Stop command causes the the test to end.
I've even made sure the 'Stop on error' is disabled at the suite level.
You question helped me solve the problem. If I launch from 'Open All Pages / Reports / Dashboard' the Runner.Stop(true) works as I was expecting. I was launching the 'Open All Pages' and it wasn't working. Thanks for the reply.
Did you check https://support.smartbear.com/viewarticle/73566/?utm_source=site-search&utm_medium=search-results&utm_campaign=site-search-c&utm_term=Stopping+the+Entire+Test+Run+When+an+Error+or+Exception+Occurs#StopOnError_project_option
I mean project palyback options
NisHera wrote:Did you check https://support.smartbear.com/viewarticle/73566/?utm_source=site-search&utm_medium=search-results&utm_campaign=site-search-c&utm_term=Stopping+the+Entire+Test+Run+When+an+Error+or+Exception+Occurs#StopOnError_project_option
I mean project palyback options
As best I can tell 'stop on error' is disabled for the suite, project, and test item yet the Runner.Stop(true) statement in the 'GeneralEvents_OnLogError' doesn't move to the next item and the test run stops. I wonder if the test must be run from the suite in order for this to work. I'll try this next.
How are you starting the test run? Are you clicking the green start arrow when the first test in your list is highlighted, or when the folder that contains all of your tests is highlighted?