Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006909TestLinkTest Execute - Filterspublic2015-01-26 13:162015-09-21 12:08
ReporterMorpheus972 
Assigned Tofman 
PriorityhighSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version
Product Version1.9.12 (2014 Q3) 
Fixed in Version1.9.14 (2015 Q3) 
Summary0006909: TC execution filter - (Result = NOT Run, ON=All Builds, without Keywords specified) shows DB Error message.
DescriptionUsing a filter on TestCases execution to find which testcase are not run in a testplan that contains several build, we get a database error message (in additianl Information)
May be linked to 0006405 ?
Steps To ReproduceHaving a working installation with several testcases.
Create a testplan, then a build.
Play some tests.
Add one or more build, on which you play also some tests.
By example we can have about 200 tests in the testplan, with a total of 40 passed on the latest build.
To know which tests are not run in all build, we use a TC execution filter whith the following parameters : Result=NOT Run, ON=ALL Builds. (All other parameters are let by default.)
Additional Information==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/testlink/lib/functions/logger.class.php:531]
#1 tlTransaction->writeToDB() called at [/testlink/lib/functions/logger.class.php:994]
0000002 tlDBLogger->writeEvent() called at [/testlink/lib/functions/logger.class.php:558]
0000003 tlTransaction->writeEvent() called at [/testlink/lib/functions/logger.class.php:478]
0000004 tlTransaction->add() called at [/testlink/lib/functions/logging.inc.php:82]
0000005 tLog() called at [/testlink/lib/functions/logging.inc.php:48]
0000006 logWarningEvent() called at [/testlink/lib/functions/logger.class.php:1396]
0000007 watchPHPErrors()
0000008 mssql_query() called at [/testlink/third_party/adodb/drivers/adodb-mssql.inc.php:772]
0000009 ADODB_mssql->_query() called at [/testlink/third_party/adodb/adodb.inc.php:1061]
0000010 ADOConnection->_Execute() called at [/testlink/third_party/adodb/adodb.inc.php:1047]
0000011 ADOConnection->Execute() called at [/testlink/lib/functions/database.class.php:182]
0000012 database->exec_query() called at [/testlink/lib/functions/database.class.php:634]
#13 database->fetchRowsIntoMap() called at [/testlink/lib/functions/testplan.class.php:4752]
0000014 testplan->getHitsSameStatusFullALOP() called at [/testlink/lib/functions/treeMenu.inc.php:1199]
0000015 filterStatusSetAllActiveBuilds() called at [/testlink/lib/functions/execTreeMenu.inc.php:548]
0000016 applyStatusFilters() called at [/testlink/lib/functions/execTreeMenu.inc.php:173]
0000017 execTree() called at [/testlink/lib/functions/tlTestCaseFilterControl.class.php:1086]
0000018 tlTestCaseFilterControl->build_tree_menu() called at [/testlink/lib/execute/execNavigator.php:32]

 ==============================================================================
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/testlink/lib/functions/logger.class.php:864]
#1 tlEvent->writeToDB() called at [/testlink/lib/functions/logger.class.php:998]
0000002 tlDBLogger->writeEvent() called at [/testlink/lib/functions/logger.class.php:558]
0000003 tlTransaction->writeEvent() called at [/testlink/lib/functions/logger.class.php:478]
0000004 tlTransaction->add() called at [/testlink/lib/functions/logging.inc.php:82]
0000005 tLog() called at [/testlink/lib/functions/logging.inc.php:48]
0000006 logWarningEvent() called at [/testlink/lib/functions/logger.class.php:1396]
0000007 watchPHPErrors()
0000008 mssql_query() called at [/testlink/third_party/adodb/drivers/adodb-mssql.inc.php:772]
0000009 ADODB_mssql->_query() called at [/testlink/third_party/adodb/adodb.inc.php:1061]
0000010 ADOConnection->_Execute() called at [/testlink/third_party/adodb/adodb.inc.php:1047]
0000011 ADOConnection->Execute() called at [/testlink/lib/functions/database.class.php:182]
0000012 database->exec_query() called at [/testlink/lib/functions/database.class.php:634]
#13 database->fetchRowsIntoMap() called at [/testlink/lib/functions/testplan.class.php:4752]
0000014 testplan->getHitsSameStatusFullALOP() called at [/testlink/lib/functions/treeMenu.inc.php:1199]
0000015 filterStatusSetAllActiveBuilds() called at [/testlink/lib/functions/execTreeMenu.inc.php:548]
0000016 applyStatusFilters() called at [/testlink/lib/functions/execTreeMenu.inc.php:173]
0000017 execTree() called at [/testlink/lib/functions/tlTestCaseFilterControl.class.php:1086]
0000018 tlTestCaseFilterControl->build_tree_menu() called at [/testlink/lib/execute/execNavigator.php:32]

 ==============================================================================
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/testlink/lib/functions/logger.class.php:864]
#1 tlEvent->writeToDB() called at [/testlink/lib/functions/logger.class.php:998]
0000002 tlDBLogger->writeEvent() called at [/testlink/lib/functions/logger.class.php:558]
0000003 tlTransaction->writeEvent() called at [/testlink/lib/functions/logger.class.php:478]
0000004 tlTransaction->add() called at [/testlink/lib/functions/logging.inc.php:82]
0000005 tLog() called at [/testlink/lib/functions/logging.inc.php:48]
0000006 logWarningEvent() called at [/testlink/lib/functions/logger.class.php:1396]
0000007 watchPHPErrors()
0000008 mssql_query() called at [/testlink/third_party/adodb/drivers/adodb-mssql.inc.php:772]
0000009 ADODB_mssql->_query() called at [/testlink/third_party/adodb/adodb.inc.php:1061]
0000010 ADOConnection->_Execute() called at [/testlink/third_party/adodb/adodb.inc.php:1047]
0000011 ADOConnection->Execute() called at [/testlink/lib/functions/database.class.php:182]
0000012 database->exec_query() called at [/testlink/lib/functions/database.class.php:634]
#13 database->fetchRowsIntoMap() called at [/testlink/lib/functions/testplan.class.php:4752]
0000014 testplan->getHitsSameStatusFullALOP() called at [/testlink/lib/functions/treeMenu.inc.php:1199]
0000015 filterStatusSetAllActiveBuilds() called at [/testlink/lib/functions/execTreeMenu.inc.php:548]
0000016 applyStatusFilters() called at [/testlink/lib/functions/execTreeMenu.inc.php:173]
0000017 execTree() called at [/testlink/lib/functions/tlTestCaseFilterControl.class.php:1086]
0000018 tlTestCaseFilterControl->build_tree_menu() called at [/testlink/lib/execute/execNavigator.php:32]

 ==============================================================================
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/testlink/lib/functions/logger.class.php:864]
#1 tlEvent->writeToDB() called at [/testlink/lib/functions/logger.class.php:998]
0000002 tlDBLogger->writeEvent() called at [/testlink/lib/functions/logger.class.php:558]
0000003 tlTransaction->writeEvent() called at [/testlink/lib/functions/logger.class.php:478]
0000004 tlTransaction->add() called at [/testlink/lib/functions/logging.inc.php:82]
0000005 tLog() called at [/testlink/lib/functions/logging.inc.php:48]
0000006 logWarningEvent() called at [/testlink/lib/functions/logger.class.php:1396]
0000007 watchPHPErrors()
0000008 mssql_query() called at [/testlink/third_party/adodb/drivers/adodb-mssql.inc.php:772]
0000009 ADODB_mssql->_query() called at [/testlink/third_party/adodb/adodb.inc.php:1061]
0000010 ADOConnection->_Execute() called at [/testlink/third_party/adodb/adodb.inc.php:1047]
0000011 ADOConnection->Execute() called at [/testlink/lib/functions/database.class.php:182]
0000012 database->exec_query() called at [/testlink/lib/functions/database.class.php:634]
#13 database->fetchRowsIntoMap() called at [/testlink/lib/functions/testplan.class.php:4752]
0000014 testplan->getHitsSameStatusFullALOP() called at [/testlink/lib/functions/treeMenu.inc.php:1199]
0000015 filterStatusSetAllActiveBuilds() called at [/testlink/lib/functions/execTreeMenu.inc.php:548]
0000016 applyStatusFilters() called at [/testlink/lib/functions/execTreeMenu.inc.php:173]
0000017 execTree() called at [/testlink/lib/functions/tlTestCaseFilterControl.class.php:1086]
0000018 tlTestCaseFilterControl->build_tree_menu() called at [/testlink/lib/execute/execNavigator.php:32]

 ==============================================================================
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query() called at [/testlink/lib/functions/database.class.php:634]
#1 database->fetchRowsIntoMap() called at [/testlink/lib/functions/testplan.class.php:4752]
0000002 testplan->getHitsSameStatusFullALOP() called at [/testlink/lib/functions/treeMenu.inc.php:1199]
0000003 filterStatusSetAllActiveBuilds() called at [/testlink/lib/functions/execTreeMenu.inc.php:548]
0000004 applyStatusFilters() called at [/testlink/lib/functions/execTreeMenu.inc.php:173]
0000005 execTree() called at [/testlink/lib/functions/tlTestCaseFilterControl.class.php:1086]
0000006 tlTestCaseFilterControl->build_tree_menu() called at [/testlink/lib/execute/execNavigator.php:32]

 ==============================================================================
TagsFilters, mssql
Database (MySQL,Postgres,etc)MSSQL 2008 R2
BrowserAll
PHP Version5.5.9-1ubuntu4
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0022561)
fman (administrator)
2015-01-26 18:11

1) please get latest code from gitorious (branch 1.9), do fresh install, retest & provide feedback

2) please give a look to guidelines in forum regarding level of details of step to reproduce. Info you have provided is not enough.
(0022571)
Morpheus972 (reporter)
2015-01-27 17:40

I do not really understand what you mean by "not enough informations" Because it seems to me that I describe all the steps:
To reproduce, follow thoses steps:
1. Log into TestLink
2. Create more than 200 testcases (about 2k ? Not really sure that it can impact the result)
3. Create a testplan.
4. Create a build.
5. Add several testcases to this testplan (at least 200, which is our case)
6. Go to execution, then play some tests (about 40)
7. Create a new build, then play again some tests (about 30 same or different as the previous build)

8. Apply "not run" on "all build" filter : with the following parameters : Result=NOT Run, ON=ALL Builds. (All other parameters are let by default.)
We get the SQL database error instead of the correct tree.


New Information, I upgrade to 1.9.13 (from gitorious), and I activated the debug mode, and I get the error message from the database (not filtered by TestLink), so I could see the query :
"0000007 watchPHPErrors(2, mssql_query(): message: Invalid column name 'tcase_id'. (severity 16), /testlink/third_party/adodb/drivers/adodb-mssql.inc.php, 772, Array ([sql] => /* Class:testplan - Method: getHitsSameStatusFullALOP */ /* COUNT() is needed as parameter for HAVING clause */ SELECT COUNT(0) AS COUNTER, NHTCV.parent_id AS tcase_id FROM testplan_tcversions TPTCV JOIN builds B ON B.testplan_id = TPTCV.testplan_id JOIN nodes_hierarchy NHTCV ON NHTCV.id = TPTCV.tcversion_id LEFT OUTER JOIN executions E ON E.testplan_id = TPTCV.testplan_id AND E.build_id = B.id AND E.tcversion_id = TPTCV.tcversion_id WHERE TPTCV.testplan_id = 18832 AND E.status IS NULL GROUP BY tcase_id HAVING COUNT(0) = 3,[inputarr] => ))
"

It seems that in the query you do a "group by tcase_id" instead of "group by NHTCV.parent_id"
I replace that directly to a client for my SQL server (mssql 2008 R2), and the query seems to work and give a result :
counter | tcase_id
3 | 1082
3 | 6150
...
(0022572)
fman (administrator)
2015-01-27 18:47

1. Issue can be MSSQL specific because different engines have different behaviour regarding group by.
TestLink is mainly tested on MySQL and Postgres

2. enough details means: I want to exactly reproduce your use case.
The same quality and kind of info I suppose you request to your customers (big difference they pay you for your product and/or support), when they report an issue.

IMHO this has been clearly explained on forum.
have you find the post?
have you consider it confusing ?
It's not possible for me create 200 test cases to do a test, that's why :
or you provide a TL XML export, or try to reproduce with less test case qty.
(0022575)
Morpheus972 (reporter)
2015-01-28 10:11

Hi,
I found the post on the forum, but maybe due to the fact I'm French, it was a little bit confusing. Any way, The way I described the issue, and the steps was for me enough, because, I read the issue N° 0006405, which have approximatively the same steps.
I'll try to give more details here.

This morning I tried with only 10 cases:
1. Create 10 testcases, but 3 or 4 can also be possible.
2. Create a testplan.
3. Create a build.
4. Add all created testcases to the testplan.
5. Go to execution, then run a test (passed/failed/blocked...).
6. Go back to desktop, to create a new build
7. Go to execution, then run an other test (passed/failed/blocked...).
8. Go back to desktop, to create a new (latest) build.
9. Go to execution, then on filters, change field "Result" to "Not Run" and "on" to "ALL Builds", then apply.
We get the SQL datbase error. As previously said, it seems to be an error due to the "invalid column name tcase_id" instead of NHTCV.parent_id.

- Issue History
Date Modified Username Field Change
2015-01-26 13:16 Morpheus972 New Issue
2015-01-26 13:23 Morpheus972 Tag Attached: Filters
2015-01-26 13:23 Morpheus972 Tag Attached: mssql
2015-01-26 18:11 fman Note Added: 0022561
2015-01-26 18:12 fman Status new => feedback
2015-01-27 13:49 Morpheus972 Note Added: 0022568
2015-01-27 13:49 Morpheus972 Status feedback => new
2015-01-27 17:40 Morpheus972 Note Added: 0022571
2015-01-27 18:47 fman Note Added: 0022572
2015-01-28 10:11 Morpheus972 Note Added: 0022575
2015-02-03 13:29 Morpheus972 Note Deleted: 0022568
2015-09-21 12:08 fman QA Team - Task Workflow Status => TBD
2015-09-21 12:08 fman Status new => closed
2015-09-21 12:08 fman Assigned To => fman
2015-09-21 12:08 fman Resolution open => fixed
2015-09-21 12:08 fman Fixed in Version => 1.9.14 (2015 Q3)



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker