I played with PICT https://github.com/Microsoft/pict but am unable to get it to express, or generate the test cases for the following:

Some things should never change.
action   : buy, sell
category : market, limit

Some things can change
duration : day, gtc
properties: tick_piot, penny

What I would like to do is to give PICT full control over things that can be optimized (duration, properties) and keep intact cases generated from action and category


buy, market, whatever
buy, limit,  whatever

How can I express this please. PICT solution is preferred. Many thanks!

1 Answer 1

action : buy, sell

category : market, limit

change : day, gtc, tick_piot, penny

properties: tick_piot, penny, day, gtc

if [action] = "buy" then [category] = "market" or [category] = "limit";

if [action] = "sell" then [category] = "market" or [category] = "limit";

if [change] = "day" then [properties] <> "day" and [properties] <> "gtc";

if [change] = "gtc" then [properties] <> "day" and [properties] <> "gtc";

if [change] = "tick_piot"then [properties] <> "tick_piot" and [properties] <> "penny";

if [change] = "penny" then [properties] <> "tick_piot" and [properties] <> "penny";

Save script above as "test.txt" in any text editor. Run in pict with/o:x option, where x is 1,2 3 or 4 the order generation of test cases. One produce a test suite that covers all values only once (combinations of 1). It is optimal for finding bugs in short time. Two is pairwise, all pairs covered and default. With four you have all possible combinations (with constraints).

More help about Pict: Pict help online

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.