Skip to content

Allow the parameterisation of a test on an existing variable from the command line #2665

@vkarak

Description

@vkarak

It's a common pattern if you have a test with a variable that can take multiple values to be able to parametrise the test on that variable. Currently, this cannot be done from the command line and we have to write some boilerplate code. For example,

class MyTest(...):
    x = variable(int, value=0)

class MyTestWithX(MyTest):
    xx = parameter(range(10))

    @run_after('init')
    def set_x(self):
        self.x = self.xx

Ideally, users should be able to do --parameterise=x:1,2,3,4

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions