Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002534TestLinkTest Executepublic2009-05-25 17:362010-10-09 08:00
Reportermalte 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.8.2 
Fixed in Version1.8.5 (bug fixing) 
Summary0002534: Import of xml test results not possible via GUI
Description1. Select "Execute tests" on the TL start page
2. Select a test case in the tree
3. Press the "mport XML Results"-button in the GUI

Now Internet Explorer shows an 'error on page':

Line: 21
Char: 2
Error: Invalid Argument
Code: 0
URL: ...execTestResults.php?....
Additional InformationPrereqs:

Logged in as Leader
TagsNo tags attached.
Database (MySQL,Postgres,etc)
BrowserInternet Explorer
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0007449)
malte (reporter)
2009-07-07 20:28
edited on: 2009-07-07 20:29

The problem seems to be in the usage of the window.open method located in the Function openImportResult in file test_automation.js.

When hardcoding the windowName, I got the window to open for selection of xml-file with test results.

However, once this problem was "solved", the import could still not be completed correctly:

The parameter buildID is not set correctly in resultsImport.php, so the build_id = 0 for all imported results in the executions-table in the DB.

(0007766)
guest (reporter)
2009-08-13 05:06

> The problem seems to be in the usage of the window.open method located
> in the Function openImportResult in file test_automation.js.
>
> When hardcoding the windowName, I got the window to open for selection
> of xml-file with test results.

Please show the patch which you changed so that a window is opened.
(0007768)
malte (reporter)
2009-08-13 12:09

function openImportResult(windows_title, build_id) {
    window.open(fRoot+"lib/results/resultsImport.php?build="+build_id,
                "import_results",
                "menubar=no,width=650,height=500,toolbar=no,scrollbars=yes");
    if (window.focus) {newwindow.focus()}

So instead of using the windows_title parameter I simply named it import_results. Unfortunately, I still haven't managed to find a way to set the build_id so that part still does not work. Any ideas?
(0007775)
guest (reporter)
2009-08-17 15:30
edited on: 2009-08-19 22:08

Please try.

gui/templates/execute/execSetResults.tpl --------------
var import_xml_results="{$labels.import_xml_results}";
var import_xml_results=import_xml_results.replace(/ /g, "_");
var export_xml_results="{$labels.export_xml_results}";
var export_xml_results=export_xml_results.replace(/ /g, "_");
.
.
.
                  <input type="button" id="pop_up_import_button" name="import_xml_button"
                         value="{$labels.import_xml_results}"
                         onclick="javascript: openImportResult(import_xml_results,{$gui->build_id});" />
.
.
.
                  <input type="button" id="pop_up_import_button" name="import_xml_button"
                         value="{$labels.import_xml_results}"
                         onclick="javascript: openImportResult(import_xml_results,{$gui->build_id});" />


gui/javascript/test_automation.js --------------
function openImportResult(windows_title,build_id) {
    window.open(fRoot+"lib/results/resultsImport.php?build="+build_id,
                windows_title,
                "menubar=no,width=650,height=500,toolbar=no,scrollbars=yes");
    if (window.focus) {newwindow.focus()}
}


lib/execute/execSetResults.php --------------
function initializeGui(&$dbHandler,&$argsObj,&$cfgObj,&$tplanMgr,&$tcaseMgr)
{
.
.
.
    $build_info = $buildMgr->get_by_id($argsObj->build_id);
    $gui->build_id = $argsObj->build_id;
    $gui->build_notes=$build_info['notes'];


------------------
Related patch
http://sourceforge.jp/projects/testlinkjp/lists/archive/users/2009-August/000641.html [^]

automated translate Japanese to English
http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2Fsourceforge.jp%2Fprojects%2Ftestlinkjp%2Flists%2Farchive%2Fusers%2F2009-August%2F000641.html&lp=ja_en&btnTrUrl=Translate [^]
http://www.excite-webtl.jp/world/english/web/?wb_url=http%3A%2F%2Fsourceforge.jp%2Fprojects%2Ftestlinkjp%2Flists%2Farchive%2Fusers%2F2009-August%2F000641.html&wb_lp=JAEN&wb_dis=2 [^]


Related
http://www.testlink.org/mantis/view.php?id=2534 [^]

Related
http://www.testlink.org/mantis/view.php?id=2647 [^]
http://www.testlink.org/mantis/view.php?id=2622 [^]
http://www.testlink.org/mantis/view.php?id=2690 [^]

Related
http://www.testlink.org/mantis/view.php?id=2449 [^]
Could import XML results with external_id.

Ex.1
<results>
<testcase external_id="TestLink-15" name="zip file">
<result>f</result>
<notes><![CDATA[test notes2]]></notes>
<timestamp>2009-05-08 12:15:10</timestamp>
<tester><![CDATA[admin]]></tester>
</testcase>
</results>

Ex.2 (Others Ex.)
<results>
<testcase internalid="52" name="zip file">
<result>f</result>
<notes><![CDATA[test notes2]]></notes>
<timestamp>2009-05-08 12:15:10</timestamp>
<tester><![CDATA[admin]]></tester>
<attachments><![CDATA[

<object width="450" name="testlink_20090502-021.PNG" type="image/x-png" data="attachments/37/testlink_20090502-021.PNG">
<param name="filename" value="testlink_20090502-021.PNG" />
</object>


]]></attachments>
</testcase>
</results>

Ex.3 (Others Ex.)
<results>
<testcase id="52" name="zip file">
<result>p</result>
<notes>test notes</notes>
<timestamp>2009-05-04 12:15:10</timestamp>
<tester>admin</tester>
<attachments><![CDATA[

<object width="450" name="testlink_20090502-021.PNG" type="image/x-png" data="attachments/37/testlink_20090502-021.PNG">
<param name="filename" value="testlink_20090502-021.PNG" />
</object>


]]></attachments>
</testcase>
</results>


Could import XML results with imanges
(results.zip:
  results.xml
  attachments/37/testlink_20090502-021.PNG
)

(0007832)
guest (reporter)
2009-08-26 21:10

patch updated (Related http://www.testlink.org/mantis/view.php?id=2647 [^] )

http://sourceforge.jp/projects/testlinkjp/lists/archive/users/2009-August/000643.html [^]

automated translate Japanese to English
http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2Fsourceforge.jp%2Fprojects%2Ftestlinkjp%2Flists%2Farchive%2Fusers%2F2009-August%2F000643.html&lp=ja_en&btnTrUrl=Translate [^]
http://www.excite-webtl.jp/world/english/web/?wb_url=http%3A%2F%2Fsourceforge.jp%2Fprojects%2Ftestlinkjp%2Flists%2Farchive%2Fusers%2F2009-August%2F000643.html&wb_lp=JAEN&wb_dis=2 [^]
(0007973)
malte (reporter)
2009-09-16 13:07

The import works fine using the changes in note 0007775.

Thanks a lot!
(0011718)
fman (administrator)
2010-10-09 08:00

Release 1.9 RC1

- Issue History
Date Modified Username Field Change
2009-05-25 17:36 malte New Issue
2009-05-25 17:36 malte Browser => Internet Explorer
2009-07-07 20:28 malte Note Added: 0007449
2009-07-07 20:29 malte Note Edited: 0007449
2009-08-13 05:06 guest Note Added: 0007766
2009-08-13 12:09 malte Note Added: 0007768
2009-08-17 15:30 guest Note Added: 0007775
2009-08-17 18:28 guest Note Edited: 0007775
2009-08-18 21:20 guest Note Edited: 0007775
2009-08-18 22:06 guest Note Edited: 0007775
2009-08-19 22:08 guest Note Edited: 0007775
2009-08-26 21:10 guest Note Added: 0007832
2009-09-16 13:07 malte Note Added: 0007973
2010-10-02 17:19 fman Status new => resolved
2010-10-02 17:19 fman Fixed in Version => 1.8.5 (bug fixing)
2010-10-02 17:19 fman Resolution open => fixed
2010-10-02 17:19 fman Assigned To => fman
2010-10-09 08:00 fman Note Added: 0011718
2010-10-09 08:00 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker