Skip to content

test sdk: Increase test coverage#483

Open
hpoeche wants to merge 6 commits intoeclipse-basyx:developfrom
rwth-iat:improve/increase-coverage
Open

test sdk: Increase test coverage#483
hpoeche wants to merge 6 commits intoeclipse-basyx:developfrom
rwth-iat:improve/increase-coverage

Conversation

@hpoeche
Copy link
Copy Markdown

@hpoeche hpoeche commented Apr 23, 2026

Previously the test coverage in the basyx.aas.adapter.aasx package
was suboptimal. The AASXWriter class was tested end-to-end in
combination with AASXReader but special cases, that lead to exceptions
were not covered. Additionally the load_directory(...) method of the
basyx.aas.adapter package was untested.

With these changes additional tests are added which cover the code
parts that are mentioned above.

hpoeche added 6 commits April 22, 2026 11:48
The load_directory() method in aas.adapter was not covered by unit
tests, which is now done.
The method get_thumbnail() of the AASXReader class was not covered
by unit tests at all.

This commit adds full coverage.
The adapter.aasx.AASXWriter class had a low branch coverage
especially on failing conditions.

These changes introduce unittests that cover cases in which
either warnings are emitted or execptions raise.
Comment thread sdk/test/adapter/test.pdf
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did already have a TestFile.pdf, which was literally an empty PDF. I prefer yours with actual diverse content, though can you replace the old file with it and adapt the paths in the new tests, so it is actually used in all tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants