Skip to main content
Build Status Python Package Index Dockerhub Automated Build Status First Timers

These are the tests for the Schul-Cloud search API. You can read motivation blog post about

  • common tests for all search engines

  • testing during live deployment

Installation

You can install the tests by installing Python version 3 and pip. Then, you run the installation from the command line:

pip install --user schul-cloud-search-tests

Installation for Development

If you would like to contribute code to this repository, you can clone it first.

git clone https://github.com/schul-cloud/schul_cloud_search_tests.git
cd schul_cloud_search_tests

Install the required packages for Python:

pip3 install --user -r requirements.txt pip-tools==1.6.5

Note that if you would like to change the requirements, please edit the requirements.in file and run this command to update the dependencies:

pip-compile --output-file requirements.txt requirements.in

Specification

The idea is that these tests run in between your search client and your search engine or search adapter. You use the test interface instead of your search engine interface to run checks on every request the client makes:

  • Is the client request formulated correctly?

  • Is the server response folmulated correctly?

These cases can be defined and are defined:

  • When the client issues a successful request and the server responds correctly, the request is forwarded, optionally including a note that the tests passed.

  • When the client issues a malformed request, HTTP error 555 is returned including the information which tests did not pass. The request is not forwarded to the server. To verify this, the client request is included in the reponse.

  • When the client issues a correct request, and the server response is malformed, then HTTP error 556 is returned including a list of error descriptions of the mistakes made by the server. To verify this, also the server response is included in the errors.

Usage

Suppose you have a server running on http://localhost:1234/v1/search/. You can tun the search engine tests as a proxy on port 8080 like this:

python3 -m schul_cloud_search_tests.proxy 8080 /endpoint/ http://localhost:1234/v1/search/

Now, all your requests to http://localhost:8080/endpoint/ will be forwarded to http://localhost:1234/v1/search/.

When you are done, you can visit http://localhost:8080/stop to stop the server or run this command:

python3 -m schul_cloud_search_tests.stop 8080

The return code is zero (success) if all tests of all requests passed. If one test fails, it is a number greater than zero.

Further Reading


You can edit this document on Github and check it with this editor.

Metadata

Release files for schul-cloud-search-tests 1.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schul-cloud-search-tests 1.0.14
File Size Uploaded
schul_cloud_search_tests-1.0.14.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for schul-cloud-search-tests 1.0.14
File Interpreter ABI Platform
schul_cloud_search_tests-1.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / schul_cloud_search_tests-1.0.14.tar.gz

Download URL schul_cloud_search_tests-1.0.14.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b55da3db1e8fe0fd85ac1ee3fb9a59f24807e512b1d68e9239dd2698c9fd801b
BLAKE2b-256 checksum
How to use checksums
fc34d36286389b9a6bc8089bf33c5e7b7c0b730d7a1cba70d15c9f74411639d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / schul_cloud_search_tests-1.0.14-py3-none-any.whl

Download URL schul_cloud_search_tests-1.0.14-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
345449e4dce22cdefbb0a399f73e8365e1865ace5a4090d9408c74727f7d63dc
BLAKE2b-256 checksum
How to use checksums
b15b0c5c32d7e5059f7a3956b20e9ad22bec06bda42f3fda69987416564e2ca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.96

2 release files

1.0.95

2 release files

1.0.94

2 release files

1.0.93

2 release files

1.0.92

2 release files

1.0.91

2 release files

1.0.88

2 release files

1.0.85

2 release files

1.0.80

2 release files

1.0.79

2 release files

1.0.78

2 release files

1.0.68

2 release files

1.0.66

2 release files

1.0.65

2 release files

1.0.50

2 release files

1.0.49

2 release files

1.0.48

2 release files

1.0.47

2 release files

1.0.46

2 release files

1.0.44

2 release files

1.0.43

2 release files

1.0.41

2 release files

1.0.40

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.33

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.20

2 release files

1.0.17

2 release files

1.0.15

2 release files

This release

1.0.14 This release

2 release files

1.0.13

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page