Speed up functional tests

Created on 12 September 2024, 5 months ago

Problem/Motivation

The functional test GenpassTest::testGenpassConfigs() uses as @dataProvider for parameters. The test is quite small, but due to the testing method, uses a new test instance for each test case. This makes the test at least 4x slower than it really needs to be.

Steps to reproduce

Run the Generate Passwords test GenpassTest::testGenpassConfigs() and review.

Proposed resolution

Wrap the existing test in a function that uses the test cases to call the real test function using the same test instance for all tests.

Also clean up some type hints on test and supporting module return values.

NB: The same number of test cases are run for this, but there are less setup assertions due to the single test instance running all of the tests.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ Automated unit testing coverage
  • ✅ Automated functional testing coverage
  • ❌ UX/UI designer responsibilities
  • ❌ Readability
  • ❌ Accessibility
  • ✅ Performance (Test)
  • ❌ Security
  • ❌ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ❌ Review with the product owner
  • ✅ Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

📌 Task
Status

Fixed

Version

2.1

Component

Testing

Created by

🇦🇺Australia elc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024