Skip to content
Lucas Carnevalli edited this page Mar 31, 2020 · 13 revisions

Configuração

Exemplo de configuração de projeto: simple-springboot-core

Adicionar dependência no pom.xml:

<dependencies>
    <dependency>
        <groupId>io.github.osvaldjr</groupId>
        <artifactId>easy-cucumber-core</artifactId>
        <version>{Utilizar a versão mais recente}</version>
        <scope>test</scope>
    </dependency>
</dependencies>    

Adicionar configurações no application.yml do teste:

# spring properties

server.port: 9000

# easy cucumber properties

easycucumber:
   target.url: http://localhost:9000

server.port Porta que a aplicação vai iniciar com @SpringBootTest.

easycucumber.target.url URL da aplicação que será testada.

Gherkins

I have a request with body ([^\"]*)

description...

I make a ([^\"]*) to ([^\"]*)

description...

I expect ([^\"]*) as response

description...

I make a request defined in ([^\"]*)

description...

I expect to receive a (\\d+) status

description...

I expect to receive a (\\d+) status with body ([^\"]*)

description...

my application host is ([^\"]*)

description...

response contains property ([^\"]*) with value ([^\"]*)

description...

response does not contain property ([^\"]*)

description...

response is valid according to schema ([^\"]*)

description...