Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008556TestLinkTest Spec / Test Suite HTML Reportpublic2019-02-01 10:172019-02-02 15:29
Reporterjck_2677 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformAny BrowserOSMicrosoft WIndowsOS Version10
Product Version1.9.19 (2019 Q1) 
Fixed in Version1.9.20 Raijing DEV 
Summary0008556: ''DB Access Error'', when clicked on "Test Suite Document (HTML) on New Window''
DescriptionI have all the test cases uploaded under a Test Suite, I want to take a print of all the available test-cases under one test suite.
Clicking on 'Test Suite Document (HTML) on New Window' or 'Download Test Suite Document (Pseudo Word)' is throwing this error.



PS: The following are the changes made to suite our requirement.
1. We have added the Time Stamp for EXECUTION report, following the steps from issue#6283.(the error we are getting here is when we generate test suite report)
2. We have localised the time zone to our local time.
Steps To Reproduce1. Create a Project
2. Create a Test-suite
3. Add Test-cases to Test-suite.
4. Now select the test suite and click on Actions icon.
5. In the available options click on 'Test Suite Document (HTML) on New Window' or 'Download Test Suite Document (Pseudo Word)'
6. Observe the following error.
Additional Information ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query( /* Class:requirement_mgr - Method: getActiveForTCVersion */ SELECT REQ.id,REQ.id AS req_id,REQ.req_doc_id,NHREQ.name AS title, RCOV.is_active, NHRS.name AS req_spec_title,RCOV.testcase_id, REQV.id AS req_version_id, REQV.version FROM requirements REQ JOIN req_specs RSPEC ON REQ.srs_id = RSPEC.id JOIN req_coverage RCOV ON RCOV.req_id = REQ.id JOIN nodes_hierarchy NHRS ON NHRS.id=RSPEC.id JOIN nodes_hierarchy NHREQ ON NHREQ.id=REQ.id JOIN req_versions REQV ON RCOV.req_version_id=REQV.id WHERE RCOV.tcversion_id IN () AND RCOV.is_active=1 , -1, -1) called at [C:\xampp\htdocs\testlink\lib\functions\database.class.php:759]
#1 database->get_recordset( /* Class:requirement_mgr - Method: getActiveForTCVersion */ SELECT REQ.id,REQ.id AS req_id,REQ.req_doc_id,NHREQ.name AS title, RCOV.is_active, NHRS.name AS req_spec_title,RCOV.testcase_id, REQV.id AS req_version_id, REQV.version FROM requirements REQ JOIN req_specs RSPEC ON REQ.srs_id = RSPEC.id JOIN req_coverage RCOV ON RCOV.req_id = REQ.id JOIN nodes_hierarchy NHRS ON NHRS.id=RSPEC.id JOIN nodes_hierarchy NHREQ ON NHREQ.id=REQ.id JOIN req_versions REQV ON RCOV.req_version_id=REQV.id WHERE RCOV.tcversion_id IN () AND RCOV.is_active=1 ) called at [C:\xampp\htdocs\testlink\lib\functions\requirement_mgr.class.php:4604]
0000002 requirement_mgr->getActiveForTCVersion() called at [C:\xampp\htdocs\testlink\lib\functions\print.inc.php:1444]
0000003 renderTestCaseForPrinting(database Object ([db] => ADODB_mysqli Object ([databaseType] => mysqli,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SELECT
            TABLE_NAME,
            CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA=,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => 1,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[substr] => substring,[port] => 3306,[socket] => ,[_bindInputArray] => ,[nameQuote] => `,[optionFlags] => Array ([0] => Array ([0] => 5,[1] => 0)),[arrayClass] => ADORecordSet_array_mysqli,[multiQuery] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table if not exists %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table if exists %s,[database] => testlink,[host] => localhost,[user] => root,[password] => not stored,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[charSet] => ,[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[bulkBind] => ,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[error_list] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[_errorMsg] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND RCOV.is_active=1' at line 1,[_errorCode] => ,[_queryID] => 1,[_isPersistentConnection] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[*connectionParameters] => Array (),[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 0,[overallDuration] => 0,[dbType] => mysqli,[databaselogEnabled] => 0,[databaselogQueries] => 0), Array ([parent_id] => 14135,[id] => 14136,[name] => Verify Launching of Aizant Automation Application in Chrome Browser,[childNodes] => ,[node_table] => testcases,[node_type_id] => 3,[node_order] => 0), Array ([toc] => 1,[headerNumbering] => 1,[header] => 1,[summary] => 1,[body] => 1,[author] => 1,[keyword] => 1,[cfields] => 1,[requirement] => 1,[req_spec_scope] => 1,[req_spec_author] => 1,[req_spec_overwritten_count_reqs] => 1,[req_spec_type] => 1,[req_spec_cf] => 1,[req_scope] => 1,[req_author] => 1,[req_status] => 1,[req_type] => 1,[req_cf] => 1,[req_relations] => 1,[req_linked_tcs] => 1,[req_coverage] => 1,[displayVersion] => 1,[execResultsByCFOnExecCombination] => 1,[notes] => 1,[step_exec_notes] => ,[passfail] => ,[step_exec_status] => ,[build_cfields] => 1,[metrics] => 1,[docType] => testspec,[tocCode] =>
TagsNo tags attached.
Database (MySQL,Postgres,etc)MS SQL Server
BrowserAny (Chrome, IE..)
PHP Version
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Filespng file icon 2019-02-01_15-38-05 Testlink error.png [^] (79,179 bytes) 2019-02-01 10:17

- Relationships
child of 0008549assignedfman Availables hot-fixes for 1.9.19 & How To get full fixed package from GitHub 

-  Notes
(0028492)
hughkay (reporter)
2019-02-01 11:02

@fman: I can observe the same behavior with Testlink 1.9.19 version.

@jck_2677:
The "$tcversion_id" could not be determined correctly in "lib/functions/print.inc.php" file.
Please try the following bugfix:
after line 1104 of print.inc.php file, where "$tcVersionID" parameter is defined, insert the following lines and try again:

  if (is_null($tcversion_id) && !is_null($tcInfo)) {
    $tcversion_id = $tcInfo['id'];
  }
(0028493)
fman (administrator)
2019-02-01 11:53

@hughkay
thanks for the hint.
There is something wrong when trying to get Test Case Version coverage:

/* Class:requirement_mgr - Method: getActiveForTCVersion */
SELECT REQ.id,REQ.id AS req_id,REQ.req_doc_id,NHREQ.name AS title, RCOV.is_active, NHRS.name AS req_spec_title,RCOV.testcase_id, REQV.id AS req_version_id, REQV.version FROM requirements REQ JOIN req_specs RSPEC ON REQ.srs_id = RSPEC.id JOIN req_coverage RCOV ON RCOV.req_id = REQ.id JOIN nodes_hierarchy NHRS ON NHRS.id=RSPEC.id JOIN nodes_hierarchy NHREQ ON NHREQ.id=REQ.id JOIN req_versions REQV ON RCOV.req_version_id=REQV.id WHERE RCOV.tcversion_id IN () AND RCOV.is_active=1

EMPTY IN CLAUSE
(0028494)
hughkay (reporter)
2019-02-01 11:56
edited on: 2019-02-01 11:58

@fman: I know the empty clause is caused by the fact that $tcversion_id is initialized with "null" and not set to something useful in this specific case.
Hence, when this sub-function "getActiveForTCVersion" is called with a "null" argument it converts the value to an empty string and this causes the SQL error.

So, at least for me, the bugfix as stated in my previous comment, works perfectly.

(0028495)
jck_2677 (reporter)
2019-02-01 12:05

@hughkay
WOW, Thanks a ton for the fix, It worked like a charm.

I could now generate the Test Suite in both the formats(HTML$ Pseudo word)

Thanks again for the fix...:)
(0028497)
fman (administrator)
2019-02-02 15:12

next stable version:
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/90c461a543df430ea08628717c5d32956c040d4f [^]


1.9.19 just fixes - Branch: 1.9.19.01
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/3c91487d6df1abcbebe9b31c9abdcb53931c00e6 [^]
(0028498)
fman (administrator)
2019-02-02 15:26

fixed also in 1.9.19.01

- Issue History
Date Modified Username Field Change
2019-02-01 10:17 jck_2677 New Issue
2019-02-01 10:17 jck_2677 File Added: 2019-02-01_15-38-05 Testlink error.png
2019-02-01 11:02 hughkay Note Added: 0028492
2019-02-01 11:53 fman Note Added: 0028493
2019-02-01 11:56 hughkay Note Added: 0028494
2019-02-01 11:58 hughkay Note Edited: 0028494 View Revisions
2019-02-01 12:05 jck_2677 Note Added: 0028495
2019-02-02 15:10 fman QA Team - Task Workflow Status => TBD
2019-02-02 15:10 fman Fixed in Version => 1.9.20 Raijing DEV
2019-02-02 15:12 fman Note Added: 0028497
2019-02-02 15:25 fman Relationship added child of 0008558
2019-02-02 15:26 fman Note Added: 0028498
2019-02-02 15:26 fman Status new => resolved
2019-02-02 15:26 fman Resolution open => fixed
2019-02-02 15:26 fman Assigned To => fman
2019-02-02 15:29 fman Relationship deleted child of 0008558
2019-02-02 15:29 fman Relationship added child of 0008549



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker