unit testing - When do BDD scenarii become too much specific? -
unit testing - When do BDD scenarii become too much specific? -
after inspiring training tdd , bdd, seek implement methodology, using mstest
, specflow
. have question i'm stuck to:
i've written acceptance tests validate subsystem working on. our scheme little distributed:
there 3rd party computer with own application running freely with 3rd party database accessing through tcp/iphowever my specflow scenario seems much specialized own development set-up: contains inputs valid me. in illustration below, ip adress accessible me. , target directory namely directory on machine.
the accredited tester/validator, or product owner not able launch same test scenario, since won't have access machine. developper colleages may not either.
@lastone scenario: lattest 3rdparty ocr info specified directory given indicate 'database' databasename of 3rd party computer , indicate '12.126.42.21' ipaddress of 3rd party computer , indicate 'user' databaseuser in 3rd party computer , indicate 'c:\temp\test_ocr\' destination path set ocr info , indicate '2013020800009e' truck identifier associated ocr info when phone call ocr application programme destination path should contain correctly named xml file, validated xml data, , jpg files ocr data.
i afraid have misconceptions bdd. specific in scenario ? if yes, should stop ?
i'm not sure question bdd specific still one.
i recommend development done continuous integration server running tests every time checkin, private project work lone on. own personal projects because teamcity free , kids desktop @ home idle when check in. importance if more obvious if work in team, because stops there ever beingness uncertainty when latest source code build.
but stops problem have. can tell when specific because doesn't work on both own personal machine , build machine. these problems exist whether work in bdd, tdd, atdd or kind of testing.
looking @ above example, i'd specific , brittle. if 3rd party pc switched off 1 day, tests fail. if using specflow run unit tests i'd recommend mocking of code can test without calling test pc, illustration reads more trying system/integration testing.
instead of specifying parameters individually, why not give name whole bundle
given im using test pc
you can set many of them in binding , if need tailor them tests still pass
[given] public void givenimusingthetestpc() { if (environment.computername == "d1234") { ipadress = 1.2.3.4; ....
this moves brittleness @ to the lowest degree keeps going now
unit-testing bdd specflow
Comments
Post a Comment