Automated Unit Tests for Reports

3 posts, 0 answers
  1. Mat
    Mat avatar
    3 posts
    Member since:
    Sep 2012

    Posted 29 Mar Link to this post

    Hi there,

    I'm going to be building some reports based on a Web Service data source and I was wondering if there's any way to build some unit tests so we can identify if a change to the underlying data / a missing sub-report etc has broken anything.

    Thanks in advance,

    Mat

  2. Ivan Hristov
    Admin
    Ivan Hristov avatar
    198 posts

    Posted 03 Apr Link to this post

    Hello Mat,

    Such unit tests could verify the reports rendering, using a ReportProcessor instance. This class allows to render a report in a specified format and returns a RenderingResult instance which can be checked for errors and also contains the bytes of the output file, if the rendering is successful. We actually use exactly this approach in our own unit tests to make sure the reports are consistently rendered.

    Hope this helps.

    Regards,
    Ivan Hristov
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Mat
    Mat avatar
    3 posts
    Member since:
    Sep 2012

    Posted 03 Apr Link to this post

    Nice one... Thanks Ivan.

    I'll start having a look / play around and see what I can do.

    Thanks again. 

    Mat

Back to Top