Automação Simples Utilizando Httparty + Cucumber
Para criar o endpoint vamos precisar instalar o node e o json server via npm:
Download Node -> https://nodejs.org/en/download/
Após, dentro do diretório testAPI_httparty\fakeAPI execute:
npm install -g json-server
Então agora vamos rodar o servidor para validar se deu tudo certo:
Dentro do diretório testAPI_httparty\fakeAPI execute:
json-server --watch endpoints.json
Então basta abrir o navegador e ver se o endpoint ta funcionando colocando 'http://localhost:3000/clientes' e o resultado será assim:
{
"clientes": [
{
"id": 1,
"nome": "Testinho",
"cpf": "12345678905",
"endereco": "Alameda dos Testes 1114",
"usuario": "usuario",
"senha": "senha"
}
]
}
Dentro do diretório testAPI_httparty\features execute:
bundle install