Tip: Boosting application testing using Queries Coverage

Tip: Boosting application testing using Queries Coverage

  
Hub Edition includes an often overlooked feature that allows the developer to quickly test all queries in his or her eSpace and gain an overview of their validity via a single report. This feature is known as Query Coverage and is available in both SQLServer and Oracle instalations.

To enable this functionality for any one eSpace, the developer should compile it with Debug information turned on. This can be done only via Service Center-triggered compilations by ticking “Enable Debug” prior to compilation, either after an upload or on the eSpace page. To obtain the Query Coverage report, simply append _queriescoverage.aspx to the normal application URL. As an example, if your application resides at

http://MyServer/MyApp/

you can get the coverage by accessing

http://MyServer/MyApp/_queriescoverage.aspx

The report is composed of one row per Advanced Query and two per Simple Query (more on this below) and 6 columns of information:

Query – The path to the query in the eSpace
Type – Either “Simple” or “Advanced”
Number Parameters – Number of parameters in this query
Used Default Params – You cannot specify the specific values to be passed as parameters to the queries being tested. As such, Hub Server sends mock values to the queries to test them. Advanced queries are always executed by receiving the Hub Edition-convention default values (e.g. zero for Integers, “” for Text etc) so this column always reads “True” for these queries. Simple Queries, on the other hand, are executed twice, one time with default and the other with sample (non-default) parameters. This column highlights which row is which.
Executed Ok – A green “True” is displayed if query succeeded, while a red “False” highlights the ones that failed.
Exception Message – When a fail occurs, this column displays the error that the DB reported.

There are a couple of things that should be borne in mind when using this powerful feature:

- You should be careful with how often and at what times you execute this feature on production servers. The Query Coverage execution is little more than concentrated database access, which may impart greatly on platform performance during its execution.
- Some valid queries may occasionally give “false” execution errors. Since the test parameter value selection is non-context specific, some queries will fail because said parameters make no sense to the information existing in the DB. “Expand Inline” parameters in particular are sensitive to this problem since they potentially contain chunks of the SQL to be executed. You should ignore failures in this case and test these queries “manually” in the context of the application execution.

This feature is only available from version 3.0 onwards. In the upcoming version 3.1 you will, furthermore, be able to test individual queries directly from Service Studio, specifing your own test parameter values and receiving real output results. More info will be made available closer to the 3.1 release date.
I know this is a really old post, but is this feature still available (in 8.0)?

I've just ran a test with the full Operation settings toggled on, and no luck :(

Inline image 1

I still don't see any _queriescoverage.aspx file once I've applied those changes (and republished the eSpace).

Inline image 3

In my scenario, DBA team would like to run through the available Advanced Queries in our applications. Would you recommend any other approach?

Thanks,
Pedro