reporting services - Specflow for Report tests? -


we've been running number of issues our reports lately, duplicate entries, not excluding right information, missing information etc. thinking of creating test suits specflow reports.

the reports displayed in ssrs or crystal reports, full end end tests off table. views , procedures these reports rely on though should testable, thinking of along lines of these lines test definitions:

scenario: report contains expected values     given execute uspsomereport with:     | field | value    |     |  | 1/1/2015 |     |    | 1/1/2016 |     result should contain:     | id    | name  |     | 3456  | john  |     | 98345 | barry |  scenario: address not duplicated     given execute uspsomereport with:     | field | value    |     |  | 1/1/2015 |     |    | 1/1/2016 |     address, postcode should unique 

i guess questions have experience writing tests reporting? there obvious problems approach this? better ideas?

you can absolutely write test indicate feed input params report sp , validate results. however, few things consider:

  1. are issues you've been encountering due data returned sp or problems in report itself? either causing data not present or duplicated. there visibility property in report definition or grouping error causing problems checking sp not discover. if know issues in sp, testing @ layer makes perfect sense. aware data can correct, report display incorrect. if need test output of actual report, 1 option may use report's export functionality export formatted report , compare known correct template validation. tools such beyond compare allow smart comparison of many different file formats (csv, pdf, excel, etc.). doing validation of actual report output way more complex , error-prone testing sp, may want start testing sp , add bulk of scenarios here , have smaller number of tests validating report output if benefit worth cost of implementing , maintaining type of tests.

  2. if move forward specflow, remember core benefit of specflow tests enable collaboration , serve living documentation, identifying stakeholders how system works. if purely desire test coverage , have no interest in collaboration aspects, may want consider simple unit test of sp. however, if looking collaborative benefits, recommend making scenarios titles more descriptive of how report works. example, in first example, might want consider "records fall on or within date range included in results" or second, "for each record returned, record's address listed once". may seem insignificant, writing scenario titles product requirements makes specflow tests more valuable in long run.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -