Skip to content

joseray/Framework_Test_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Framework_Test_API

Java project created for the automation of api testing, this project was developed with the following technologies:

  • Cucumber
  • JUnit
  • Log4j
  • Java
  • Maven

Use the following command to run the created demo feature: "mvn test -Dcucumber.options="--tags @joseTest"" (without the first quotes)

The framework has the capacity to obtain the result of the executed tests, when the tests are finished ok printing in the console a message like the following:

@alpha_corpus @randomPhrase
Feature: Random phrase
  Should be returner a random phrase.

  @alpha_corpus @randomPhrase @joseTest
  Scenario: Get random phrases                                                                                   # src/test/java/features/alpha_corpus/securityCrendentials.feature:8
    Given I set the "https://qa.alphacorpus.servex.com.pe/data/api" base URL                                     # givenGeneralSteps.setBaseURL(String)
    When I perform a GET request to the "/frases/locutor" path                                                   # requestGeneralWhenSteps.performGet(String)
    Then The response should contain the 200 status code                                                         # requestGeneralThenSteps.validateStatusCodeResponse(int)
    And The response should contain the application/json; charset=utf-8 content type                             # requestGeneralThenSteps.validateContentType(String)
    And The schema of the response should be equal to the "/alpha_corpus/schemes/phrases/randomPhrase.json" file # requestGeneralThenSteps.validateSchemaResponse(String)

1 Scenarios (1 passed)
5 Steps (5 passed)
0m3.334s

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.607 sec - in RunCukesTest
Good Job :D

When the test is finished with errors, it will print in the console the step that failed along with the error message generated by Cucumber, the integration with Testlink has to be implemented so that all the results are sent and have a report, I am currently working on this integration.

For technical details of the project do not hesitate to ask me :D

About

Framework to automate API tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published