BDD Tests - Log messages are not getting generated
Using TC 14 to write testcases using BDD tests. Written basic scenario and it is working fine.
But in the log file no steps are being shown - attached screenshot of log file
Below is the example of the test I have written. Let me know if i am missing something or some setting
Feature File:
Feature: Verify Text Message
Scenario: Verify Home Page message is displayed
Given The "Application" is launched
When "Application" is visible on screen
Then verify "Home Page" message displayed on screen
Step definition:
Given("The {arg} is launched", function (param1){
TestedApps.Application.Run();
Sleep(50);
});
When("ICE {arg} is visible on screen", function (param1){
var retVal = aqObject.CheckProperty(MainWindow(),"VisibleOnScreen",cmpEqual,true);
if(retVal)
{
Log.Message("Application is visible on screen") ;
}
else
{
Log.Error("Error in launching Application") ;
}
});
Then("verify {arg} message displayed on screen", function (param1){
var retVal = aqObject.CheckProperty(ExampleHomePageText(),"WPFControlText",cmpEqual,"Example Home Page");
if(retVal)
{
Log.Message("Verified Home Page text displayed on main window") ;
}
else
{
Log.Error("Error in verifying text") ;
}
});
AfterScenario(function (scenario){
Application.Close();
});
Thanks,
Manu G
Got the answer:
Onstart Event function is written to have couple of Log statements which is overriding the log to be generated for steps performed for BDD test. need to override it or create a new project for BDD test.