Skip to main content

Package to run tests against osml-tile-server deployments.

Project description

OSML Tile Server Test

This package contains the integration tests for OSML Tile Server application

Table of Contents

Getting Started

Prerequisites

First, ensure you have installed the following tools locally

  1. aws cli
  2. docker
  3. tox

Installation Guide

  1. Clone osml-tile-server-test package into your desktop
git clone https://github.com/aws-solutions-library-samples/osml-tile-server-test.git
  1. Run tox to create a virtual environment
cd osml-tile-server-test
tox

Documentation

You can find documentation for this library in the ./doc directory. Sphinx is used to construct a searchable HTML version of the API documents.

tox -e docs

Running Tests

In AWS Lambda

The Tile Server Test package is designed to be deployed as an AWS Lambda Container. The osml-cdk-constructs package contains the required resources, and example stacks can be found in the associated AWS Guidance Repository. When deployed in this manner, the Tile Server integration tests can be initiated by running npm run integ:tile-server from the guidance repository.

In Docker

For testing and development purposes, the Tile Server tests can be executed locally in Docker. Arguments can be passed to docker run to configure the endpoint, test type, source bucket, and source image. If testing against a local tile server, --network host may need to be added as a docker run flag.

Example Build:

docker build . -t tile-server-test:latest

Example Integration test:

docker run --name osml-tile-server-test --rm tile-server-test:latest --endpoint <Endpoint URL> --test_type integ --source_image_bucket <S3 bucket> --source_image_key <S3 Image Key> -v

Example Locust Load test (Default UI address is http://localhost:8089):

docker run --name osml-tile-server-test --rm tile-server-test:latest --endpoint <Endpoint URL> --test_type load --source_image_bucket <S3 bucket> --locust_image_keys <S3 Image Key>,<S3 Image Key> -v

Other optional load test flags are:

  • --locust_headless <true/false> Disable the web interface, and start the test immediately. Default: False
  • --locust_users <number> Load Test: Peak number of concurrent Locust users.
  • --locust_run_time <string> Stop after the specified amount of time, e.g. (300s, 20m, 3h, 1h30m, etc.)
  • --locust_spawn_rate <string> Rate to spawn users at (users per second).

Support & Feedback

To post feedback, submit feature ideas, or report bugs, please use the Issues section of this GitHub repo.

If you are interested in contributing to OversightML Model Runner, see the CONTRIBUTING guide.

Security

See CONTRIBUTING for more information.

License

MIT No Attribution Licensed. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osml-tile-server-test-0.1.0.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

osml_tile_server_test-0.1.0-py3-none-any.whl (22.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page