cancel
Showing results for 
Search instead for 
Did you mean: 

BDD Tests - Log messages are not getting generated

SOLVED
Highlighted
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: BDD Tests - Log messages are not getting generated

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.

View solution in original post

2 REPLIES 2
Occasional Contributor

Re: BDD Tests - Log messages are not getting generated

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.

View solution in original post

Community Manager

Re: BDD Tests - Log messages are not getting generated

Thanks for sharing the solution with us!

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓