Specflow:
Specflow is a testing framework that supports the.NET technology's Behavior Driven Development (BDD). It defines a test case's behavior in plain English using a simple grammar language known as "Gherkin."
Feature: A feature file is a point of entry into the Specflow test. It is an essential component of specflow because it serves as both an automation test script and live documents. A scenario can be contained in a single feature file or multiple scenarios can be contained in a single feature file, but it usually contains a list of scenarios.
With feature extension, you can add a feature file to your project, and your test scenario will be written in Gherkin language in the format of Given, When, And, Then.
Example:
Feature: API Application
Scenario: Get API response using given endpoint
Given I have an endpoint "/endpoint/"
And I have a base url "http://mydomain.com"
when I call GET method of API
Then I get API response in JSON format
Step Definition: A step argument transformation is a method that converts text (specified by a regular expression) to an arbitrary.NET type. Scoped bindings can be used to limit the scope of a step definition or hook.
namespace APIAutomation.Steps
{
[Binding]
public class API Application
{
[Given (@"I have an endpoint (.*)")]
public void GivenIHaveAnEndpoint(string endpoint)
{
ScenarioContext.Current.Pending ();
}
}
}
Thank you!
ReplyDeleteSpecflow >>>>> Download Now
ReplyDelete>>>>> Download Full
Specflow >>>>> Download LINK
>>>>> Download Now
Specflow >>>>> Download Full
>>>>> Download LINK cc