Skip to content

Simple automated Api tests for Airport GAP, with CI pipeline integration for seamless test execution.

License

Notifications You must be signed in to change notification settings

BrandonNaidoo/airportgap-apiintegration-tests

Repository files navigation

airportgap-apiintegration-tests

Build Status

Service Status
GitHub GitHub Workflow Status
CircleCI CircleCI
SonarCloud Quality Gate Status

Project Overview

This project contains C# integration tests for the Airport Gap API built using NUnit. The tests demonstrate:

  • A reusable HTTP client framework with support for authenticated and unauthenticated requests
  • FluentAssertions for expressive and maintainable assertions
  • Continuous Integration via Github Actions, CircleCI and static code analysis with SonarCloud

Getting Started

Prerequisites

  • .NET 9 SDK or later
  • A valid Airport Gap API token set as an environment variable for authenticated tests (see below)

Setup

  1. Clone the repository:
    git clone https://github.com/BrandonNaidoo/airportgap-apiintegration-tests.git
    cd airportgap-apiintegration-tests
  2. Set the API token environment variable: On Windows (PowerShell):
    $env:AIRPORT_GAP_API_TOKEN = "your_api_token_here"
    On macOS/Linux:
    export AIRPORT_GAP_API_TOKEN=your_api_token_here
  3. Restore dependencies and build:
    dotnet restore
    dotnet build

🚀 Running Tests

Run all tests using the .NET CLI:

dotnet test

This will execute the NUnit tests, using the API token from the environment variable for authenticated requests where applicable.


🧩 Project Structure

Project Structure

  • Integration-tests/
    • Framework/ — HTTP client, factories, request/response builders
    • Models/ — Request and response data models
    • Tests/ — NUnit test classes organized by API features
  • .circleci/ — CircleCI configuration for CI pipelines
  • README.md — This documentation

⚙️ CI/CD and Quality

  • GitHub Actions and CircleCI are both configured to run integration tests on push and pull request events
  • SonarCloud provides code quality and coverage reports, linked in the badges above
  • Tests enforce code style via .NET analyzers and run with FluentAssertions for clarity

🤝 Contributing

At this time, this project is not open to external contributions.

Please feel free to fork the repository for personal use or experimentation, but I am not currently accepting pull requests or feature suggestions.


📄 License

This project is licensed under the MIT License.


🙌 Acknowledgments

Thanks to Dev Tester for providing a publicly Api for testing.

About

Simple automated Api tests for Airport GAP, with CI pipeline integration for seamless test execution.

Topics

Resources

License

Stars

Watchers

Forks

Languages