Giter Site home page Giter Site logo

bf-skeleton-java-api-rest's Introduction

REST ASSURED API TESTING FOR THE STAR WARS DATABASE

This robot uses JSON Schema validations of Star Wars API database (Swapi) responses. This helps detect any changes and assess their impact on other projects.

This project leverages the Serenity BDD framework, a comprehensive library designed to streamline the creation of high-quality automated acceptance tests, significantly reducing development time. Promoting adherence to the SOLID principles ensures that the source code remains maintainable and robust. Additionally, Serenity BDD offers extensive reporting tools and supports parallel test execution, enhancing efficiency and productivity.

Source code serves as a vital communication medium among developers, making it crucial to maintain its cleanliness and readability. This project incorporates linting tools such as pre-commit to ensure code quality, which automatically formats the code with each execution. The project's repository is hosted on GitHub and utilizes GitHub Actions for continuous integration, effectively preventing the merge of any code that falls short of established quality standards.

Finally, the project integrates SonarQube to analyze the source code and identify potential issues, ensuring the codebase remains clean and maintainable. You can see more about this in the CONTRIBUTE.md section "Static Code Analysis".


✏️ HOW TO CONTRIBUTE

See CONTRIBUTE.md


🧰 TECH STACK

Requirements

  • Java 17
  • Maven
  • Serenity BDD
  • Cucumber
  • RestAssured
  • JUnit5
  • NodeJS (optional)
  • SonarQube (optional)

IDE Plugins

  • JUnit
  • Cucumber-java
  • Gherkin
  • Maven
  • Lombok
  • Sonarlint (optional)

📗 DOCUMENTATION

PENDING.


🚀 EXECUTION

Run all tests

mvn clean verify

Run a specific test

You have two options. You can do it through the command line:

mvn clean verify -Dcucumber.options="--tags @tag"

You can do it through the IDE by opening the feature file and clicking on the play button.

Open the test report

After the execution with the command line, you can open the report in the following path target/site/serenity/index.html.


🔧 TROUBLESHOOTING

If, during a commit, you get an error like this:

Pre-commit hook failed

[ERROR] fatal: cannot run .git/hooks/pre-commit: No such file or directory

You can fix it by running the following commands:

mvn com.rudikershaw.gitbuildhook:git-build-hook-maven-plugin:install
chmod +x .git/hooks/pre-commit

✏️ SERENITY + SCREENPLAY PATTERN

Want to learn more? For more information about Serenity BDD, you can read the Serenity BDD Book, the official online Serenity documentation source. Other sources include:

bf-skeleton-java-api-rest's People

Contributors

alexandradenet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.