ntt icon indicating copy to clipboard operation
ntt copied to clipboard

Add read test specific configuration from testcase tags

Open 5nord opened this issue 3 years ago • 3 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

5nord avatar Mar 15 '22 10:03 5nord

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

github-actions[bot] avatar Jun 14 '22 03:06 github-actions[bot]

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

github-actions[bot] avatar Sep 13 '22 04:09 github-actions[bot]

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

github-actions[bot] avatar Dec 13 '22 02:12 github-actions[bot]