Age | Commit message (Collapse) | Author |
|
As mentionned in earlier commit, pytest-django takes a conservative approach
to enabling database access. By default our tests will fail if they try to access
the database, Only if we explicitly request database access will this be allowed,
using pytest marks to tell pytest-django our test needs database access.
A side effect of pytest mark, is test_case method marked is execute out of
scope of its module class, which create an inconsistance sequence and make fails
followings tests.
The scope of the ordering is global per default, e.g. tests with lower ordinal
numbers are always executed before tests with higher numbers in the same test session,
regardless of the module and class they reside in. This can be changed by using
the --order-scope option from module pytest-order.
To fix that i added execution order to tests suite using pytest-order.
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
|
|
*** Update toaster-requirements.txt ***
Add pytest and some plugin's
- Pytest-html is a plugin for pytest that generates a HTML report for test results.
- Pytest-django allows us to test Django project/applications with the pytest testing tool.
- Pytest-env is a pytest plugin that enables us to set environment variables in a pytest.ini or pyproject.toml file
- Pytest-metadata is a plugin for pytest that provides access to test session metadata, required by pytest-html plugin
to provides metadata information in the HTML report like below:
Python 3.10.12
Platform Linux-6.2.0-35-generic-x86_64-with-glibc2.35
Packages:
- pytest: 7.4.2
- pluggy: 1.3.0
Plugins :
- django: 4.5.2
- metadata: 3.0.0
- order: 1.1.0
- html: 4.0.2
- env: 1.1.0
*** Added pytest.ini file ***
The main reason for using pytest is to be able to generate a positive test report
using the pytest-html plugin.
Integrating Pytest with Tox is a straightforward process, this can be
done using tox.ini instead of pytest.ini used to configure pytest, that
is another reason for using pytest. Tox is a tool that automates testing
across different virtual environments, it can help ensure application
will be tested against multiple Python versions and environments.
https://github.com/pytest-dev/pytest/blob/main/tox.ini
Generated reports create a historical record of test results over time.
This can help track the progress of the application's stability and quality
Documentation and Transparency: Test reports provide us a clear and detailed
documentation of the test results. They show what tests were executed,
which ones passed, and which ones failed. This transparency is critical
for understanding the current state of the application and its test coverage.
Communication: Test reports are an effective means of communication among community
to understand the testing progress and results.
Debugging, Troubleshooting Historical Tracking and Regression Testing:
In case of test failures, a detailed test report can be invaluable for debugging.
It provides information about the specific test case that failed,
the input data used, and any error messages.
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
|
|
Updated selenium version to latest 4.13.0, changed selenum specific version syntax elements to accomplish test success
Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Create a new folder for Selenium tests.
Add a new base Selenium testcase class and a helper which
instantiates a webdriver for a given browser.
Add a sample Selenium test case which can be used as a template
for creating new tests.
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|