Replies: 1 comment 1 reply
-
Hi @pevogam one possibility would be to use Job API and create two suites. Like this: #!/usr/bin/env python3
import sys
from avocado.core.job import Job
from avocado.core.suite import TestSuite
config_variant = {
"resolver.references": ["../avocado/examples/tests/sleeptest.py:SleepTest.test"],
"yaml_to_mux.files": ["../avocado/examples/tests/sleeptest.py.data/sleeptest.yaml"],
}
suite_variant = TestSuite.from_config(config_variant)
config = {
"resolver.references": ["../avocado/examples/tests/sleeptest.py:SleepTest.test"],
}
suite = TestSuite.from_config(config)
with Job(config, [suite, suite_variant]) as j:
sys.exit(j.run()) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Is there a way to provide specific variant multiplications to specific unit tests? If we have a python file of two unit tests like:
then is it possible to define separate parameters and variants for test1 as opposed to test2? The way it seems to me right now, any variantis and parameters we apply here will multiply and end up with the same variant parameters for both test1 and test2 prompting the need to provide only one method, one class, and even one file per unit test. Is there even a way to provide separate variants for separate files? The command line seems to pick up variants and apply them for all files listed under avocado-run (or maybe I miss something in the way I use it).
I read through both
https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/writing.html#running-multiple-variants-of-tests
https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapters/parameters.html#test-parameter
but didn't find anything relevant to this.
Beta Was this translation helpful? Give feedback.
All reactions