This library contains a suite of end-to-end tests that you can perform against Steamship.
If you are running a private-hosted version of Steamship, we recommend running this test suite as part of your setup, and then regularly to monitor system health.
We recommend creating a test user to isolate any artifacts and workload that testing involves.
Follow the instructions in DEVELOPING to set up your virtual environment
Set the following environment variables for testing:
- Your Steamship API Domain. If you are using
steamship.com
, this step is not necessary. If you have a private Steamship installation, use the API domain you normally use.
export STEAMSHIP_DOMAIN=https://api.steamship.yourcompany.com/
export STEAMSHIP_DOMAIN=http://localhost:8080
export STEAMSHIP_DOMAIN=https://api.staging.steamship.com/
- Your Steamship API key.
export STEAMSHIP_KEY=
- Your default QA Embedding Model name. For private installations, this default plugin may be custom.
export STEAMSHIP_EMBEDDER_QA=st_msmarco_distilbert_base_v3
- Your default Similarity Embedding Model name. For private installations, this default plugin may be custom.
export STEAMSHIP_EMBEDDER_SIM=st_paraphrase_mpnet_base_v2
- Your default Parsing Model name. For private installations, this default plugin may be custom.
export STEAMSHIP_PARSER_DEFAULT=sp_en_core_web_trf
With the virtual environment active and environment variables set, run:
./bin/tox
Or run one test
./bin/tox -- tests/test_embedding_index.py::test_empty_queries
Testing locally requires a few steps:
-
Create a publicly accessible inbound proxy. If using the cloud task scheduler, this will enable it to contact the Steamship Engine on the local machine.
ngrok http 8080
-
Wire up the inbound proxy.
In your
~/.steamship-config.json
file, set thequeueUrl
with the NGrok URL just generated.You must use the https variant!
"queueUrl": "https://a5c6eb28c411.ngrok.io/...",
-
Run the Steamship Engine. Await its availability on Port 8080.
-
Run the steps for Production Testing. See above.