Skip to content

Functional tests for ElasticSearch Document API using official Python Elasticsearch Client.

Notifications You must be signed in to change notification settings

kate-tel/elasticsearch-document-api-test-suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Elasticsearch Document API functional testing

Table of Contents

About this Project

This test suite perfoms functional testing for ElasticSearch Document API 7.7.0.

Test coverage

CRUD APIs covered by this test suite:

Single document APIs

  • Index
  • Get
  • Delete
  • Update

Multi-document APIs

  • Multi get
  • Bulk
  • Delete by query
  • Update by query API
  • Reindex

Prerequisites

  1. Python 3

Setup of testing environment

  1. Run Elasticsearch locally

This project is tested with Elasticsearch 7.7.0. Set up instructions can be found here. For the purpose of running the test suite one-node cluster is enough. Follow steps 1-3. You now have a single-node Elasticsearch cluster up and running!

  1. Clone this repository and go to folder
git clone https://github.com/kate-tel/elasticsearch-document-api-test-suite.git
cd elasticsearch-document-api-test-suite
  1. Install virtualenv
pip3 install -U pip
pip3 install virtualenv
  1. Create & activate virtual env
virtualenv .venv
source .venv/bin/activate
  1. Install requirements.

As a result, Python Elasticsearch Client 7.8.0 will be installed.

pip3 install -r requirements.txt

Running the tests

  1. To run the tests from the command line:
python -m unittest tests_es_py.py
  1. To run individual test methods:
python -m unittest tests_es_py.ElDocumentAPITest.test_create_doc_with_id

References

  1. Elasticsearch Document API documentation version 7.7.0.

  2. Python Elasticsearch Client API documentation.

  3. Unittest Command-line interface for running the tests

About

Functional tests for ElasticSearch Document API using official Python Elasticsearch Client.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages