clinical-reasoning icon indicating copy to clipboard operation
clinical-reasoning copied to clipboard

Test case discovery

Open JPercival opened this issue 1 year ago • 0 comments

Add an operation to the CQL Evaluator that for a given library will return test case definitions.

CQL Unit Testing · Issue #40 · DBCG/cql-language-server

Acceptance Criteria: The cql-evaluator has an operation that can return a set of test-case definitions from a CQL Test library as described in the linked ticket. Each test case should have a primary library, context set, input parameters, and the path to the source for data, terminology, and content as applicable per test case. I should be able to invoke this operation from the command-line and get JSON structures being output.

Steps:

  1. The cql-evaluator currently only supports one operation. Need to expand that framework to support multiple operations.
  2. The TestCase structure should have the same input parameters as the current CQL operation. Each test case is a “run” of that operation that may result in a failure.
  3. the cql-evaluator needs to translate the CQL and read the “test” tags described above. That creates a “TagSet”. There’s work in the cql-translator to start that. Needs to visit the ELM graph and collect those.
  4. Once we have a TagSet, we need to interpret those into TestCases. The semantics of the tags are such that tags declared at the Library level apply to all test cases, while tags at the definition level apply to specific test cases and override the library-level tags
  5. Write the test cases out as JSON.

JPercival avatar Sep 30 '22 16:09 JPercival