Revision: 10ceb1062350
Author: Pekka Klärck
Date: Mon Jun 20 14:44:40 2011
Log: Fixed tests that were broken after writing tag doc to output as
html. Now these tests check values using dom and don't check static xml.
Also removed all static html check tests.
http://code.google.com/p/robotframework/source/detail?r=10ceb1062350
Modified:
/atest/robot/tags/tag_doc.txt
/atest/robot/tags/tag_doc_with_rebot.txt
=======================================
--- /atest/robot/tags/tag_doc.txt Mon Jun 20 06:55:41 2011
+++ /atest/robot/tags/tag_doc.txt Mon Jun 20 14:44:40 2011
@@ -1,101 +1,32 @@
*** Settings ***
-Suite Setup Run Tests And Read Outputs
+Suite Setup Run Tests --tagdoc f1:Some_documentation --tagdoc
t1:http://some.url_*bold* --tagdoc d?:Doc_for_many_tags --tagdoc
D2:More_doc --tagstatcombine d*:DX misc/normal.html
Force Tags pybot jybot regression
Resource atest_resource.txt
+Test Template Tag doc should be correct in output
+
*** Test Cases ***
-Tag Doc In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct f1 Some documentation
-
-Tag Doc In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct f1 Some documentation
-
-Tag Doc In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct f1 Some documentation
-
-Tag Doc In Output Statistics
- Format In Output Statistics Should Be Correct f1 Some documentation
-
-Tag Doc With Formatting In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct t1 http://some.url
*bold*
-
-Tag Doc With Formatting In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct t1 http://some.url *bold*
-
-Tag Doc With Formatting In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct t1 <a
href="http://some.url">http://some.url</a> <b>bold</b>
-
-Tag Doc With Formatting In Output Statistics
- Format In Output Statistics Should Be Correct t1 http://some.url
*bold*
-
-Tag Doc With Pattern In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Output Statistics
- Format In Output Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Multiple Matches In Report Statistics
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Output Statistics
- Format In Output Statistics Should Be Correct d2 Doc for many tags
& More doc
+
+Simple Tag Doc
+ 3 f1 Some documentation
+
+Specify Tag Doc With Pattern
+ 1 d1 Doc for many tags
+
+Tag Doc With Multiple Matches
+ 2 d2 Doc for many tags & More doc
+
+Tag Doc With Formatting
+ 4 t1 <a href="http://some.url">http://some.url</a> <b>bold</b>
Tag Doc For Combined Statistics
- Format In Output Statistics Should Be Correct DX Doc for many tags
+ 0 DX Doc for many tags
+
*** Keywords ***
-Run Tests And Read Outputs
- Run Tests --log log.html --report report.html --tagdoc
f1:Some_documentation --tagdoc t1:http://some.url_*bold* --tagdoc
d?:Doc_for_many_tags --tagdoc D2:More_doc --tagstatcombine d*:DX
misc/normal.html
- ${LOG} = Get File ${OUT_DIR}${/}log.html
- ${REPORT} = Get File ${OUT_DIR}${/}report.html
- ${OUTPUT} = Get File ${OUT_FILE}
- Set Suite Variable $LOG
- Set Suite Variable $REPORT
- Set Suite Variable $OUTPUT
-
-Format In Report Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <div class="stat_name"> <a
href="#tag_${tag}" title="${doc}"> ${tag}</a></div>\n
- Should Contain ${REPORT} ${expected}
- [Return] ${expected}
-
-Format In Log Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <div class="stat_name"> <span
title="${doc}"> ${tag}</span></div>\n
- Should Contain ${LOG} ${expected}
-
-Format In Report Details Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <td class="col_name"> <a
name="tag_${tag}"></a> ${tag} </td>\n <td class="col_doc">
- ... ${doc} </td>\n <td class="col_tags not_available"> N/A </td>\n
- Should Contain ${REPORT} ${expected}
-
-Format In Output Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${stat_line} = Get Lines Containing String ${OUTPUT} ${tag}</stat>
- Should Contain ${stat_line} doc="${doc}"
-
+
+Tag doc should be correct in output
+ [Arguments] ${index} ${tag} ${doc}
+ ${stats} = Get Tag Stat Nodes
+ Should Be Equal ${stats[${index}].text} ${tag}
+ Should Be Equal ${stats[${index}].attrs['doc']} ${doc}
=======================================
--- /atest/robot/tags/tag_doc_with_rebot.txt Mon Jun 20 09:25:25 2011
+++ /atest/robot/tags/tag_doc_with_rebot.txt Mon Jun 20 14:44:40 2011
@@ -1,103 +1,36 @@
*** Settings ***
-Suite Setup Run Tests And Read Outputs
+Suite Setup Run Tests And Rebot
Force Tags pybot jybot regression
Resource atest_resource.txt
+Test Template Tag doc should be correct in output
+
*** Test Cases ***
-Tag Doc In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct f1 Some documentation
-
-Tag Doc In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct f1 Some documentation
-
-Tag Doc In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct f1 Some documentation
-
-Tag Doc In Output Statistics
- Format In Output Statistics Should Be Correct f1 Some documentation
-
-Tag Doc With Formatting In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct t1 http://some.url
*bold*
-
-Tag Doc With Formatting In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct t1 http://some.url *bold*
-
-Tag Doc With Formatting In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct t1 <a
href="http://some.url">http://some.url</a> <b>bold</b>
-
-Tag Doc With Formatting In Output Statistics
- Format In Output Statistics Should Be Correct t1 http://some.url
*bold*
-
-Tag Doc With Pattern In Report Statistics
- [Tags] static_html_checks
- Format In Report Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d1 Doc for many tags
-
-Tag Doc With Pattern In Output Statistics
- Format In Output Statistics Should Be Correct d1 Doc for many tags
-
-Tag Doc With Multiple Matches In Report Statistics
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Log Statistics
- [Tags] static_html_checks
- Format In Log Statistics Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Report Details
- [Tags] static_html_checks
- Format In Report Details Should Be Correct d2 Doc for many tags More
doc
-
-Tag Doc With Multiple Matches In Output Statistics
- Format In Output Statistics Should Be Correct d2 Doc for many tags
& More doc
+
+Simple Tag Doc
+ 3 f1 Some documentation for rebot
+
+Specify Tag Doc With Pattern
+ 1 d1 Doc for many rebot tags
+
+Tag Doc With Multiple Matches
+ 2 d2 Doc for many rebot tags & More doc
+
+Tag Doc With Formatting
+ 4 t1 <a href="http://some.url">http://some.url</a> <b>bold</b>
Tag Doc For Combined Statistics
- Format In Output Statistics Should Be Correct DX Doc for many tags
+ 0 DX Doc for many rebot tags
*** Keywords ***
-Run Tests And Read Outputs
+Run Tests And Rebot
Run Tests Without Processing Output ${EMPTY} misc/normal.html
- Run Rebot --log log.html --report report.html --tagdoc
f1:Some_documentation --tagdoc t1:http://some.url_*bold* --tagdoc
d?:Doc_for_many_tags --tagdoc D2:More_doc --tagstatcombine d*:DX
${OUT_FILE}
- ${LOG} = Get File ${OUT_DIR}/log.html
- ${REPORT} = Get File ${OUT_DIR}/report.html
- ${OUTPUT} = Get File ${OUT_FILE}
- Set Suite Variable $LOG
- Set Suite Variable $REPORT
- Set Suite Variable $OUTPUT
-
-Format In Report Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <div class="stat_name"> <a
href="#tag_${tag}" title="${doc}"> ${tag}</a></div>\n
- Should Contain ${REPORT} ${expected}
- [Return] ${expected}
-
-Format In Log Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <div class="stat_name"> <span
title="${doc}"> ${tag}</span></div>\n
- Should Contain ${LOG} ${expected}
-
-Format In Report Details Should Be Correct
- [Arguments] ${tag} ${doc}
- ${expected} = Catenate SEPARATOR= <td class="col_name"> <a
name="tag_${tag}"></a> ${tag} </td>\n <td class="col_doc">
- ... ${doc} </td>\n <td class="col_tags not_available"> N/A </td>\n
- Should Contain ${REPORT} ${expected}
-
-Format In Output Statistics Should Be Correct
- [Arguments] ${tag} ${doc}
- ${stat_line} = Get Lines Containing String ${OUTPUT} ${tag}</stat>
- Should Contain ${stat_line} doc="${doc}"
-
+ Run Rebot --tagdoc f1:Some_documentation_for_rebot --tagdoc
t1:http://some.url_*bold* --tagdoc d?:Doc_for_many_rebot_tags --tagdoc
D2:More_doc --tagstatcombine d*:DX ${OUT_FILE}
+
+Tag doc should be correct in output
+ [Arguments] ${index} ${tag} ${doc}
+ ${stats} = Get Tag Stat Nodes
+ Should Be Equal ${stats[${index}].text} ${tag}
+ Should Be Equal ${stats[${index}].attrs['doc']} ${doc}
+