csspin_ce.pkgtest

The csspin_ce.pkgtest plugin provides a way to run package tests for CONTACT Elements instances by using the pkgtest command-line tool.

How to setup the csspin_ce.pkgtest plugin?

For using the csspin_ce.pkgtest plugin, a project’s spinfile.yaml must at least contain the following configuration.

Minimal configuration of spinfile.yaml for csspin_ce.pkgtest
plugin_packages:
    - csspin-ce
    - csspin-java
    - csspin-python
plugins:
    - csspin_ce.pkgtest
contact_elements:
    umbrella: <The umbrella to use>
python:
    version: '3.11.9'
pkgtest:
    name: cs.template
    package: dist/cs.template-*.whl
    caddok_package_server_index_url: <index URL to retrieve wheels from>
java:
    version: '17'

The provisioning of the required tools and the plugins dependencies can be done via the well-known spin provision-command.

How to run package tests for a local CE instance?

To run the package tests required to run a local CE instance, the spin pkgtest command can be used.

Additional options and arguments are passed to the underlying pkgtest command-line tool.

How to install additional packages required for testing a package?

Additional packages required during tests can be configured as follows:

Additional packages required for testing a package
pkgtest:
    ...
    additional_packages:
        - dist/cs.templatetest-*.whl

How to skip or configure executing the acceptance tests?

Some projects may not require to execute acceptance tests. To skip the execution of acceptance tests, set the tests key to an empty string.

Skip acceptance tests
pkgtest:
    ...
    tests: ""

Other projects may require to execute a custom command for executing the acceptance tests. This can be achieved by modifying the test_command property.

Custom test command
pkgtest:
    ...
    test_command: <Custom test command>

csspin_ce.pkgtest schema reference

pkgtest: 'object'

The pkgtest plugin for csspin provides a wrapper around the pkgtest CLI tool, for validating the built wheels. The plugin helps a lot for dealing with the quite complex CLI of pkgtest.

pkgtest.additional_packages: 'list'

List of additional packages that shall be installed into the pkgtest venv.

pkgtest.opts: 'list'

List of additional options for the pkgtest command.

pkgtest.caddok_package_server_index_url: 'str'

URL of the index from where the packages for the pkgtest venv shall be installed.

pkgtest.caddok_package_server: 'str'

DNS Name of the package server.

pkgtest.dbms: 'str'

The DBMS that pkgtest should use.

pkgtest.name: 'str'

Name of the package under test. Defaults to ‘{spin.project_name}’.

pkgtest.package: 'str'

The package under test. May be a glob.

pkgtest.tests: 'str'

behave testsuite to run during pkgtest.

pkgtest.test_command: 'str'

Custom test command to run during pkgtest.

pkgtest.schema: 'object'
pkgtest.requires: 'object'
pkgtest.requires.spin: 'list'
pkgtest.requires.python: 'list'
pkgtest._requires: 'list'