Skip to main content

schul_cloud_search_tests

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.9

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.9
File Size Uploaded Provenance Actions
schul_cloud_search_tests-1.0.9.tar.gz 3.7 kB Without provenance Details for schul_cloud_search_tests-1.0.9.tar.gz

Built distribution (wheel)

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

Total release size: 10.1 kB

Release files / schul_cloud_search_tests-1.0.9.tar.gz

Download URL schul_cloud_search_tests-1.0.9.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd1d1688ef9cbddf0e48028e30e0f73b0a61f26aee831e647e89148b731914cf
BLAKE2b-256 checksum
How to use checksums
e485a362ea2291d82507c1eaee3a5051e5da5fdf6971ff5ef57cda2ffd98182f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL schul_cloud_search_tests-1.0.9-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecd135dbd0e2898885463ed6f9a9d256de15a8d24bf93c2b2956e08248e728a4
BLAKE2b-256 checksum
How to use checksums
5d9efd8aba940c98a7ff7ed235bf04bbeabc064c3aa09cbdee25b0c0f3e5854b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for schul-cloud-search-tests 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files No provenance

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