nokia / ntt

Modern tools for TTCN-3

Home Page:https://nokia.github.io/ntt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add read test specific configuration from testcase tags

5nord opened this issue · comments

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

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days