Giter VIP home page Giter VIP logo

acceptance-tests's Introduction

A modular, open-source search engine for our world.

Pelias is a geocoder powered completely by open data, available freely to everyone.

Local Installation · Cloud Webservice · Documentation · Community Chat

What is Pelias?
Pelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.

We think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.

Pelias Geocoder Acceptance Tests

This repository contains all of the Pelias Geocoder's "acceptance" tests.

Roughly, acceptance tests are the (relatively) small set of tests by which we describe expected functionality. As much as possible, by running the acceptance tests we should be able to feel confident that nothing major is broken.

Acceptance tests can be used to validate a new Pelias installation, aid in new feature development, and ensure new features do not result in regressions.

Prerequisites

Running the acceptance tests requires a supported version of Node.js.

Setup

$ npm install

Configuration

The acceptance tests need to know how to contact your Pelias instance, and this can be configured through pelias.json.

If your Pelias instance has an API key, you can also specify it in the credentials section. This will be passed along as the api_key parameter in the URL.

{
  "acceptance-tests": {
    "endpoints": {
      "prod": "http://domain-name-of-your-pelias/v1/"
    },
    "credentials": {
      "domain-name-of-your-pelias": "your-api-key"
    }
  }
}

By default, Pelias looks for pelias.json in your home directory (~/pelias.json).

Alternatively, you can put it anywhere, and specify the PELIAS_CONFIG environment variable.

For example, to use a central config at /etc/pelias.json, use the following:

$ export PELIAS_CONFIG=/etc/pelias.json

Usage

For full usage, see the fuzzy-tester usage docs.

With no parameters, all tests are run against the endpoint named prod (Defaults to Geocode Earth if not overridden).

$ npm test

Environment names can be specified with -e

$ npm test -- -e bigdev

Specific files can be run by passing a file or "glob"

$ npm test -- -e dev my_test_suite.json
$ npm test -- -e dev my_test_suites*.json

dump results from failing tests into json files, one per failing test

$ npm test -- -e dev -o json

Test Case Files

For a full description of what can go in tests, see the pelias-fuzzy-tester documentation

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.