Specifications of critical systems

39 views
Skip to first unread message

LiohAu

unread,
Jun 24, 2015, 10:49:27 AM6/24/15
to cu...@googlegroups.com
Hello,

I work in a company that makes software medical devices, so we have a lot of specifications (thousands)

In almost each of our software there is at least one complex algorithm with a lot of rules and each rules depends on a lot of input data.

So how do you write specifications for this kind of system using the gherkin format ? I understood that I should not put irrelevant details in the scenario in order to make it more readable, some people here suggested to use attached excel files, but what if these data are relevant to understand what must be done ? 
Complex systems really exists, and I don't think it's the goal of specifications to hide this complexity. But it should at least help to understand the system...

An typical example we could have is a rule that depends on a treatment profile (containing dozen of parameters), the patient history (previous results of several different tests), patient profile (weight, sex..) to determine the appropriate dosage for a drug.
This is usually the kind of thing that is specified via a diagram or by hundreds of individual sentences (which makes it traceable but unreadable..) or both.


aslak hellesoy

unread,
Jun 24, 2015, 12:19:24 PM6/24/15
to Cucumber Users
You could try a combination of Scenario Outlines and Pairwise testing:


Aslak
 

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

LiohAu

unread,
Jul 7, 2015, 8:29:22 AM7/7/15
to cu...@googlegroups.com
Sure, the scenario outlines will let me specify ranges of values for all these parameters, but the scenario remains unreadable because of the number of parameters of different kind involved.

Scenario Outline: Recommended dosage rule abc.123
Given the patient is a <gender>
And the patient has blood pressure <diastolic>/<systolic>
And the patient treatment profile is configured with the following values
| parameter_a     | parameter_b  | parameter_c  |    parameter_d  | ... | 
| <value_a>         |    <value_b>  | <value_c>     |    <value_d>      | ... |
And ...
And ...
And ... others parameters again..
When the patient enter <inr>
Then the recommended dosage should be <recommended_dose>

Examples:
| gender | diastolic | systolic | ... | 
| male    | 120        | 75         | ... |

This quickly becomes unreadable, don't you think ?

Pairwise testing => Weird that you suggest a test method to write specifications for cucumber since you're saying everywhere that it is not a "test tool" but a "collaborative tool"...

Andrew Premdas

unread,
Jul 7, 2015, 1:57:28 PM7/7/15
to cu...@googlegroups.com
So don't use scenario outlines and instead write your scenarios at a higher level of abstraction where listing all the details of the patients symptoms is not required. You would best do this by giving appropriate names to a set of symptoms, then you can say

Given the patient is showing xxx symptoms
When ...
Then ...

You could even get clever and have an environment variable that will allow the thing that assigns symptoms to print them out, so that the output of running the scenario could (optionally) list the actual symptoms.

This would allow you to have a single point of truth that defines each set of symptoms, rather than talking the rather error prone approach of duplicating the symptoms names and other parameters in a feature file, just so they can be output in a format that nobody will ever read!

All best

Andrew
--
------------------------
Andrew Premdas
Reply all
Reply to author
Forward
0 new messages