Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Graphical User Interface for STH & STU Tests #14

Open
sanssecours opened this issue Jan 19, 2021 · 0 comments
Open

Create Graphical User Interface for STH & STU Tests #14

sanssecours opened this issue Jan 19, 2021 · 0 comments
Labels
enhancement New feature or request usability Something does not work as assumed

Comments

@sanssecours
Copy link
Member

sanssecours commented Jan 19, 2021

Description

Changing the values in the configuration file and calling the test scripts (test-sth, test-stu) is not very user friendly. We should offer a graphical user interface (GUI) for this task.

Implementation Hints

Using Environment Variables

Since we use DyanConf for the configuration of the tests we can change config values using environment variables. For example, to use another value for the STH name we can set the environment variable DYNACONF_STH__NAME. The following PowerShell code sets the STH name to Blubb before it executes the STH connection test:

$env:DYNACONF_STH__NAME = 'Blubb'
# The connection test will now try to connect to ”Blubb” 
test-sth -k connect 

Updating the environment variables inside Python is possible using the environ mapping object. This means we should be able to use the steps below to implement the backend of the GUI.

  1. Change configuration values using environ
  2. Call the STU or STH test script (e.g. using the run function of the subprocess module)
  3. Check the return value and output of the test command

Calling the Python Code Directly

Another solution might be to call the code of the TestCase class directly. Before that we would update the settings for the configuration values directly (e.g. settings.sth.name = "Blubb"). We could use the TestClass to run the code and analyze the result using the result attribute.

@sanssecours sanssecours added enhancement New feature or request usability Something does not work as assumed labels Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Something does not work as assumed
Projects
None yet
Development

No branches or pull requests

1 participant