This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Library RequestsLibrary | |
| Library Collections | |
| *** Variable *** | |
| ${HOST} https://webmaniabr.com/api/1/cep | |
| ${APP_KEY} njMf2EiyQ17g6C3vLUxk1yEsWTforVqf | |
| ${APP_SECRET} EgpTuUcM93IqHY8icgR3cK6Cn4bOlkQwSlfLd6ryMjrhhwMW | |
| *** Keywords *** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Realiza requisição do CEP | |
| [Arguments] ${CEP_DESEJADO} | |
| ${RESPOSTA}= Get Request consultaCEP /${CEP_DESEJADO}/?app_key=${APP_KEY}&app_secret=${APP_SECRET} | |
| Log Resposta: ${RESPOSTA.text} | |
| Set Test Variable ${RESPOSTA} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Confere o status code | |
| [Arguments] ${STATUS_ESPERADO} | |
| Should Be Equal As Strings ${RESPOSTA.status_code} ${STATUS_ESPERADO} | |
| Log Status Code Retornado: ${RESPOSTA.status_code} -- Status Code Esperado: ${STATUS_ESPERADO} | |
| Confere endereço do CEP | |
| [Arguments] ${ENDERECO} | |
| Dictionary Should Contain Item ${RESPOSTA.json()} endereco ${ENDERECO} | |
| Confere bairro do CEP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Documentation Suíte de Exemplo de testes API com o Robot Framework | |
| Resource BDDpt-br.robot | |
| Resource Resource.robot | |
| *** Test Case *** | |
| Cenário 01: Consulta de endereço existente | |
| Dado que esteja conectado no webservice de consultas de CEP | |
| Quando o usuário consultar o CEP "88056-000" | |
| Então deve ser mostrado o endereço "Avenida Luiz Boiteux Piazza" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Documentation Exemplo de uso da Library Faker | |
| Library FakerLibrary | |
| *** Test Cases *** | |
| Imprime exemplos de utilidades da library FakerLibrary | |
| Exemplos relacionados a pessoa | |
| Exemplos relacionados a datas | |
| Exemplos diversos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Documentation Sikuli Library Demo | |
| Test Setup Carrega diretório de imagens | |
| Test Teardown Stop Remote Server | |
| Library SikuliLibrary | |
| *** Variables *** | |
| #As imagens da pasta img devem estar de acordo com a interface do seu PC!!!! Tire os prints necessários! | |
| ${IMAGE_DIR} ${CURDIR}\\img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Documentation Exemplo de uso de uma Library personalizada e criada por mim em Python | |
| ... Essa library irá decodificar uma string em base64 para UTF-8 | |
| Library ./libraries/decode64.py | |
| *** Test Cases *** | |
| Teste da minha custom library | |
| Decodificar o texto "TWluaGEgZnJhc2UgZGUgdGVzdGUh" | |
| Conferir se o texto decodificado é "Minha frase de teste!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| def decode_64_to_string(stringEncoded): | |
| print("Deconding [%s] to string." % stringEncoded) | |
| if not stringEncoded.endswith("=="): | |
| stringEncoded = stringEncoded + "==" | |
| stringDecoded = base64.b64decode(stringEncoded) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Settings *** | |
| Documentation Exemplo de tipos de variáveis: SIMPLES, LISTAS e DICIONÁRIOS | |
| *** Variable *** | |
| #Simples | |
| ${SIMPLES} Vamos ver os tipos de variáveis no robot! | |
| #Tipo Lista | |
| @{FRUTAS} morango banana maça uva abacaxi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### I HAVE MY DEFAULT JSON IN ${CURDIR}/data/input/input_request_body_default.txt | |
| { | |
| "initialDate": "INICIAL_DATE", | |
| "finalDate": "FINAL_DATE", | |
| "filters": {FILTERS}, | |
| "returnFields": [RETURN_FIELDS], | |
| "groupBy": [GROUPBY] | |
| } | |
| #### I MAKE MY MESSAGEM IN EXECUTION TIME |
OlderNewer