Closed mpermperpisang closed 2 years ago
Most programming languages should be supported. Could you please provide the step definition example?
this is my .feature, @alexkrechik
@api
Feature: Variant API
@variant-api-1
Scenario: Variant API With Non Array Body
Given client has "ENV:ACCOUNT_BASE_URL_2" as base api
And client login as "USER"
And client has "ENV:API_BASE_URL_3" as base api
When client sends a GET request to "ENV:ENDPOINT"
Then response status should be "200"
And response should have "$.data..active"
And response should have "$.data..assurance"
and this is my step definition
package apisuites
import (
"github.com/DATA-DOG/godog"
"github.com/golang-automation/features/stepdefinitions/apisteps"
)
/*AutomationAPI is suites for API*/
func AutomationAPI(s *godog.Suite) {
s.Step(`^client login as "([^"]*)"$`, apisteps.AuthenticationAPI)
s.Step(`^client sends a ([^\"]*) request to "([^\"]*)"$`, apisteps.RequestAPIWithoutBody)
s.Step(`^client sends a ([^\"]*) request to "([^\"]*)"(?: with body:)?$`, apisteps.RequestAPIWithBody)
s.Step(`^response should have "([^"]*)"$`, apisteps.ResponseFindPath)
s.Step(`^response should have "([^"]*)" matching "([^"]*)"$`, apisteps.ResponseMatchingValue)
s.Step(`^response "([^"]*)" should be (integer|string|float64)$`, apisteps.ResponseDataType)
s.Step(`^client collects "([^"]*)" as "([^"]*)"$`, apisteps.CollectsJSON)
}
"Step" keyword is not supported by default. Looks like, that you should use cucumberautocomplete.gherkinDefinitionPart option like:
"cucumberautocomplete.gherkinDefinitionPart": "(Step)\\(",
I've tried to using "cucumberautocomplete.gherkinDefinitionPart": "(Step)\\(",
but it also didn't work
Do you use strictGherkinValidation option?
No, I don't use strictGherkinValidation Should I use it?
cc @alexkrechik
In the latest extension version, 'Step' param and "`" quotes should be supported from scratch.
hello
I've tried this plugin in my vscode I'm using ruby and golang and it doesn't seems work do I have to using js only?