Repository navigation
StoryTellingAndTestCases
title: StoryTellingAndTestCases – gpc-informatics
source: https://web.archive.org/web/20220602162232/https://informatics.gpcnetwork.org/trac/Project/wiki/StoryTellingAndTestCases
author: Dan Connolly
published:
created: 2014-04-20
description:
tags:
- clippings
- informatics
- gpc-dev
- research
- health
- dataA great way to start SoftwareDev is telling stories, and a great way to know when you're finished is when you have a corresponding suite of tests.
For example, for the patient and fact count ticket (#1) that resulted in babel, the stories we had in mind (but didn't manage to write down) were something like:
The obesity cohort experts look at how BMI is represented at different GPC sites.
or...
For DataStandardization, measure how close we are to having all labs encoded with LOINC.
These can be refined and negotiated as development progresses until eventually we have automated tests that show that the story is supported.
For example, heron_policy.py is a module that enforces HERON governance policies. The code includes a doctest that both documents the policy and tests that the code enforces the policy:
36 Dr. Smith has signed the system access agreement and is current on his
37 human subjects training, so he can access the repository and make
38 investigator requests::
39
40 >>> facreq = _login('john.smith', mc, hp, PERM_STATUS)
41 INFO:cache_remote:system access query for ('SAA', 'john.smith@js.example')
42 INFO:cache_remote:... cached until 2011-09-02 00:00:15.500000
43 INFO:cache_remote:in DROC? query for john.smith
44 INFO:cache_remote:... cached until 2011-09-02 00:01:00.500000
45 >>> facreq.context.status # doctest: +NORMALIZE_WHITESPACE
46 Status(current_training='2012-01-01', droc=None, executive=False,
47 expired_training=None, faculty=True, sponsored=None,
48 system_access_signed=[datetime.datetime(2011, 8, 26, 0, 0)])
49
50 He can follow the "start i2b2" link:
51 >>> facreq = _login('john.smith', mc, hp, PERM_START_I2B2)
52
53 But he has yet to acknowledge the disclaimer:
54
55 >>> authz = facreq.context.start_i2b2()
56 Traceback (most recent call last):
57 ...
58 KeyError: 'john.smith'
Last modified 8 years ago Last modified on Feb 20, 2014 9:14:25 PM
Navigation
- Home
- Governance
- Endo / object capabilities
- Retrospectives and source material