ContributionsMost RecentMost LikesSolutionsRe: Execute Scenario from AfterFeature function Thank you so much rraghvani This is the same thing that I did. And it started working as expected. Thank you. Re: Execute Scenario from AfterFeature function rraghvani I got what was wrong on my side. My requirement is to execute the particular Teardown in both cases: When the whole feature file gets executed and returns success. When any scenario from that feature file fails. In the first case, everything works as expected as you mentioned. But when I get into 2nd case teardown doesn't work properly. You can try failing any scenario from GroupFeature. In this case, Features.Item(i).Scenarios.Item(j).Run(); This won't get executed. Could you please help me to fix this case? Is there any configuration we need to change to make it work? Thank you. Re: Execute Scenario from AfterFeature function When I created the new project I was able to run the scenario properly. Not sure what is the issue with the current project. Will check in detail and get back to you. Thank you rraghvani for your quick response. Re: Execute Scenario from AfterFeature function I am using Version: 15.57.2.7 x64 I am on a Free trial. Expected to Log this warning, which is not happening. The scenario "tearDown" is not getting executed. Re: Execute Scenario from AfterFeature function Thank you rraghvani, I really appreciate your help. Is it possible to share the project with me either on Git Hub or by sharing the zip of code? I am also doing the same thing but not working on my end. If you share the code I can try to run it on my end and compare the code properly. I shared the details in inbox. Re: Execute Scenario from AfterFeature function This will be a good alternative for executing teardown after each feature in the Execution Plan. But it will be great if I can run the same from AfterFeature. If I run the Feature file separately in that case Teardown will not run after the feature file as we need to Run the Execution Plan. Thank you. Re: Execute Scenario from AfterFeature function Yes, I am aware of the Feature and Scenario. Here is the full Screenshot of 2 different files. Is it possible to share the project that you created on Git Hub or in any other way? When the Groups feature file stops execution then I want to run the GroupFeature Scenario from Treardown.feature File. This is from Teardown.feature file. This is from Groups.feature file It would be a great help if you could share the example project that you just created. Thank you. Re: How to get the name of the current feature in AfterFeature or any other function AfterFeature itself takes a feature object as the Last running feature. So you can get the name of the feature from that object only. AfterFeature(function (feature){ Log.Message("The " + feature.Name + " feature file has been executed"); }); Re: Execute Scenario from AfterFeature function Thank you for the example rraghvani The scenario Name is the same as the feature name that I provided. Here are the names of the Feature and Scenario that I am trying to execute. Did you write the AfterFeature code in the same file where you wrote the steps definition? I am using different script files for AfterFeature and for the step definition of my scenario. Re: Execute Scenario from AfterFeature function Yes, I tried, My code is running till, Features.Item(i).Scenarios.Item(j).Run(); But nothing happened after that. Expected to execute the Scenario by opening a browser and navigating to the URL.