Skip to content

Add read test specific configuration from testcase tags #488

@5nord

Description

@5nord

The parameters file stores test specific configuration in a central location. With many test specific configurations, this file can become large and unwieldy. Allowing test specific configurations inside testcase case can relax this situation and provide an attractive alternative for test configuration.

Proposal

Allow test configuration in testcase tags:

  • @timeout: 23.5: time out limit in seconds
  • @parameter: mod.ParamA 23.5: specify value for module parameter
  • @verdict: fail: expected verdict
  • @except:preset capacity: except spec
  • @only:preset capacity: only spec

A tags-based test configuration is equivalent of a parameters file execution entry. As a consequence below example will configure the test two times:

$ cat example.ttcn3
module test {
    // @timeout: 2.0
    testcase Foo() { setverdict(pass) }
}

$ cat example.parameters
execute:
    - test: test.Foo
      timeout: 1.0

$ ntt show --json
"execute": [
    { "test": "test.Foo", "timeout": 2.0 },
    { "test": "test.Foo", "timeout": 1.0 },
]

Related #487

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions