Skip to content
A fully-functional API to help you improve your test automation skills.
HTML Ruby JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
app
bin
config
db
lib
log
public
spec
tmp
vendor
.browserslistrc
.gitignore
.rspec
.ruby-version
Gemfile
Gemfile.lock
LICENCE
Procfile
Procfile.dev
README.md
Rakefile
apid.yaml
babel.config.js
config.ru
package.json
postcss.config.js
yarn.lock

README.md

Airport Gap

Airport Gap is a RESTful API to help you improve your API automation testing skills. It provides access to a database of airports, calculate distances between airports, and allows you to save your favorite airports.

You can create a free Airport Gap account at https://airportgap.dev-tester.com/.

Airport data is provided by OpenFlights.org under the Open Database License.

Airport Gap is provided by Dev Tester - articles and tips to help you improve your test automation skills as a developer.

QuickStart: Setting up and running the application locally

Airport Gap is a Rails 6.0 application. You need the following dependencies installed to run the application:

  • Ruby (current version: 2.6.5)
  • Bundler (current version: 2.0.2)
  • Yarn (current stable version)
  • PostgreSQL (version 10.0 or greater)

Once the dependencies are installed, run the bin/setup script to set up the application. The script will perform the following steps automatically:

  • Install Ruby dependencies (bundle install)
  • Install Javascript dependencies (yarn install)
  • Set up the database with seed data (rails db:prepare)

When everything is installed, run the Rails server locally with rails s. The application will be accessible at http://localhost:3000/.

Automated tests

The Airport Gap application has a suite of automated tests to help during development.

Unit tests are set up with RSpec. To run the tests, set up the application's Ruby dependencies (bundle install) and a test database, and run rails spec.

End-to-end tests for the API are covered with APId. To run the tests, download the APId binary, set it up in your PATH, and run apid check. The tests require the following environment variables:

  • AIRPORT_GAP_API_URL: The URL of the API endpoints. If you're running the application locally, the URL is http://localhost:3000/api.
  • AIRPORT_GAP_EMAIL: The email address for a valid Airport Gap account in the application.
  • AIRPORT_GAP_PASSWORD: The password for the Airport Gap account in the application.
You can’t perform that action at this time.