1604: Built-in Reporting Framework with Jasper Engine / Angular Parameterization

Test Case #:284


Test Case Name: Built-in Reporting Framework with Jasper Engine / Angular Parameterization

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:01.02.2017

Short description

Acceptance Criteria

  • There should be new rights in the system, REPORTS_VIEW and REPORT_TEMPLATES_EDIT.
  • The demo administrator user should have these rights via a "Reporting Personnel" role.
  • The view requisition report template endpoint (/api/reports/templates/requisitions/id) should now return a selectValues property for each templateParameter.
    • This property should be an array of strings and should reflect the results if the selectSql property was run against the database.
  • There should be a new endpoint (/api/reports/templates/requisitions/id/format) that can generate reports for an existing report template. (Format options are pdf, csv, xls, html)
  • The Reference UI should have a new report tab with a "View reports" link for any user with the REPORTS_VIEW right. (administrator has this right, devadmin or admin do not.)
    • This link goes to the View Reports page.
  • The View Reports page shows all requisition reports in the system.
    • This page is only viewable by someone with the REPORTS_VIEW right.
    • Clicking on the report name goes to the Choose Report Options page for that report.
  • The Choose Report Options page shows options defined in the report.
    • This page is only viewable by someone with the REPORTS_VIEW right.
    • Clicking on a format button (PDF, CSV, XLS, HTML) will open a new tab with the report in that format.
    • The report generated should vary based on the options chosen.
  • Any user without the REPORT_TEMPLATES_EDIT right should not be able to use the following endpoints:
    • POST /api/reports/templates/requisitions
    • PUT /api/reports/templates/requisitions/id
    • DELETE /api/reports/templates/requisitions/id
  • Any user without the REPORTS_VIEW right should not be able to use the following endpoints:
    • GET /api/reports/templates/requisitions
    • GET /api/reports/templates/requisitions/id
    • GET /api/reports/templates/requisitions/id/format

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

For now, I can't update the requisition report. I did not set headers.

Step

Action

Expected system response

Comment

1

   As a devadmin, try to use following endpoint:

                                                                                                                            

                                                 

2

As a devadmin, try to use following endpoint:

  • Method: GET

 

 

3

 As a devadmin, try to use following endpoint:

 

 

4

 As a devadmin, try to use following endpoint:

 

 

5

  As a devadmin, try to use following endpoint:

 

 

6

 Check if user with proper permission can view the Reports panel.

 

 

7

 Check if user with proper permission can select "Program Name" to generate the report.

 

 

8

                     Genarate report using one of displayed formats: HTML, CSV, PDF or XLS.                          .

 

OR

 

9As a devadmin with out permissions, try to view the Reports panel


10


As an administrator, try to update the template for requisition report.



 

 

Post – conditions

OpenLMIS: the global initiative for powerful LMIS software