basyx-python-sdk icon indicating copy to clipboard operation
basyx-python-sdk copied to clipboard

Server and integration tests

Open Frosty2500 opened this issue 2 years ago • 3 comments

As a part of refactoring towards a monolithic repository https://github.com/eclipse-basyx/basyx-python-sdk/issues/277 we will need tests for the server, which do not exist at all yet and integration tests for both the server and the compliance-tool.

For the server both adapter.http.py will have to be tested and the Docker container with which it will be spun up. Tests for the compliance-tool already exist, they will have to be integradted into the ci pipeline.

Frosty2500 avatar Sep 18 '24 14:09 Frosty2500

This week I took part in IDTA Plug-Fest. One workstream was about testing with aas-test-engines. I could install it and try it out.

So, as a temporarlily workaround we may use it to test our server. I have already created issues (#309 , #310) based on some testing findings. There are much more errors, which will be found during the test!

P.S. As we serve our server locally with http, you need to add --no-verify argument when checking the server:

# Check server
aas_test_engines check_server https://localhost https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRepositoryServiceSpecification/SSP-002 --no-verify

zrgt avatar Oct 10 '24 12:10 zrgt

When we adapt the server tests, we need to remember to also update the CONTRIBUTING.md.

s-heppner avatar Jul 20 '26 12:07 s-heppner

@paul-gerber-svg and me starting developing unittests for the repository.py, discovery.py and registry.py WSGI apps using the werkzeug.test.Client. We test for both json and xml responses of the server. These test cases aim to verify the server responses follow the API specification.

Additionally, integration tests will be used to verify the setup inside the docker container is correct. The test cases will not verify the content of server responses but check for example round trips of writing and reading an AAS.

hpoeche avatar Sep 01 '26 14:09 hpoeche