Revision: 3927
Author: jussi.ao.malinen
Date: Thu Aug 26 03:04:45 2010
Log: moved tests to own suites
http://code.google.com/p/robotframework/source/detail?r=3927

Added:
 /trunk/atest/robot/cli/rebot/argumentfile.txt
 /trunk/atest/robot/cli/rebot/help_and_version.txt
 /trunk/atest/robot/cli/rebot/syslog.txt
Deleted:
 /trunk/atest/robot/cli/rebot/misc_tests_to_be_moved_to_own_suites.txt

=======================================
--- /dev/null
+++ /trunk/atest/robot/cli/rebot/argumentfile.txt       Thu Aug 26 03:04:45 2010
@@ -0,0 +1,15 @@
+*** Settings ***
+Test Setup      Empty Output Directory
+Suite Setup     Set Runners
+Force Tags      regression  pybot  jybot
+Resource        atest_resource.txt
+Resource        rebot_cli_resource.txt
+
+*** Test Cases ***
+Argument File
+ Create File ${MYOUTDIR}${/}a.txt --name From_Arg_File\n -c c1\n # comment line\n --log none\n -r none\n --output ${MYOUTDIR}${/}output.xml\n ${MYINPUT} + ${output} = Run ${REBOT} --critical c2 --argumentfile ${MYOUTDIR}${/}a.txt 2>&1
+    Should Not Contain  ${output}  ERROR
+    Process Output  ${MYOUTDIR}${/}output.xml
+    Should Be Equal  ${SUITE.name}  From Arg File
+    Should Be True  ${SUITE.critical.tags} == []
=======================================
--- /dev/null
+++ /trunk/atest/robot/cli/rebot/help_and_version.txt Thu Aug 26 03:04:45 2010
@@ -0,0 +1,29 @@
+*** Settings ***
+Test Setup      Empty Output Directory
+Suite Setup     Set Runners
+Force Tags      regression  pybot  jybot
+Resource        atest_resource.txt
+Resource        rebot_cli_resource.txt
+
+*** Test Cases ***
+Help
+    ${rc}  ${help} =  Run And Return Rc And Output  ${REBOT} --help 2>&1
+    Should Be Equal  ${rc}  ${251}
+    Log  ${help.replace(' ','_').replace('\\t','_'*8)}
+ Should Start With ${help} Rebot -- Robot Framework Report and Log Generator\n \n Version: \ + Should End With ${help} \n\n# Running 'robot/rebot.py' directly and creating combined outputs.\n $ python /path/robot/rebot.py -N Project_X -l x.html -r x.html outputs/*.xml\n
+    Should Not Contain  ${help}  ERROR
+ @{lines} = Evaluate [ '%d\\t%s' % (len(line), line) for line in ${help.splitlines()} ]
+    Log Many  @{lines}
+ @{long} = Evaluate [ line for line in ${help.splitlines()} if len(line) - line.count('\\\\') >= 80 ]
+    Log Many  @{long}
+    Should Be True  len(@{long}) == 0  Too long (>= 80) help line(s)
+    ${help2} =  Run  ${REBOT} -h 2>&1
+    Should Be Equal  ${help}  ${help2}
+
+Version
+ ${rc} ${output} = Run And Return Rc And Output ${REBOT} --version 2>&1
+    Should Be Equal  ${rc}  ${251}
+    Log  ${output}
+ Should Match Regexp ${output} ^Rebot (2\\.\\d+(\\.\\d+)?( (alpha| beta|rc)\\d*)?|trunk 2\\d{7}) \\([PJ]ython 2\\.[\\d.]+ on .+\\)$
+    Should Be True  len("${output}") < 80  Too long version line
=======================================
--- /dev/null
+++ /trunk/atest/robot/cli/rebot/syslog.txt     Thu Aug 26 03:04:45 2010
@@ -0,0 +1,45 @@
+*** Settings ***
+Test Setup      Empty Directory  ${MYOUTDIR}
+Suite Setup     Set Runners
+Force Tags      regression  pybot  jybot
+Resource        atest_resource.txt
+Resource        rebot_cli_resource.txt
+
+*** Test Cases ***
+Setting Syslog File
+    Set Environment Variable  ROBOT_SYSLOG_FILE  ${MYOUTDIR}${/}syslog.txt
+    Rebot Something
+    File Should Not Be Empty  ${MYOUTDIR}${/}syslog.txt
+    Remove File  ${MYOUTDIR}${/}syslog.txt
+    Delete Environment Variable  ROBOT_SYSLOG_FILE
+    Rebot Something
+    File Should Not Exist  ${MYOUTDIR}${/}syslog.txt
+    Set Environment Variable  ROBOT_SYSLOG_FILE  none
+    Rebot Something
+    File Should Not Exist  ${MYOUTDIR}${/}syslog.txt
+    [Teardown]  Delete syslog environment variables
+
+Setting Syslog Level
+    Set Environment Variable  ROBOT_SYSLOG_FILE  ${MYOUTDIR}${/}syslog.txt
+    Set Environment Variable  ROBOT_SYSLOG_LEVEL  INFO
+    Rebot Something
+    ${size1} =  Get File Size  ${MYOUTDIR}${/}syslog.txt
+    Set Environment Variable  ROBOT_SYSLOG_LEVEL  DEBUG
+    Rebot Something
+    ${size2} =  Get File Size  ${MYOUTDIR}${/}syslog.txt
+    Should Be True  0 < ${size1} <= ${size2}
+    Set Environment Variable  ROBOT_SYSLOG_LEVEL  warn
+    Rebot Something
+    File Should Be Empty  ${MYOUTDIR}${/}syslog.txt
+    [Teardown]  Delete syslog environment variables
+
+
+*** Keywords ***
+Delete syslog environment variables
+    Delete environment variable  ROBOT_SYSLOG_FILE
+    Delete environment variable  ROBOT_SYSLOG_LEVEL
+
+Rebot Something
+    Run  ${REBOT} --outputdir ${MYOUTDIR} ${MYINPUT}
+
+
=======================================
--- /trunk/atest/robot/cli/rebot/misc_tests_to_be_moved_to_own_suites.txt Mon Aug 23 09:49:49 2010
+++ /dev/null
@@ -1,113 +0,0 @@
-*** Settings ***
-Documentation Testing Rebot's command line functionality. Functionality tested elsewere:\n - filtering by tags/names\n - combining outputs\n - creating correct html (incl. --xxxtitle options)
-Test Setup      Empty Directory  ${MYOUTDIR}
-Suite Setup     Set Runners
-Force Tags      regression  pybot  jybot
-Resource        atest_resource.txt
-
-*** Variables ***
-${TESTFILE}  misc${/}normal.html
-${PASS_FAIL_FILE}  misc${/}pass_and_fail.html
-${MYOUTDIR}  ${TEMPDIR}${/}robot-test-145435
-${MYINPUT}  ${TEMPDIR}${/}robot-test-145435.xml
-${M_211_211} 2 critical tests, 1 passed, 1 failed\n 2 tests total, 1 passed, 1 failed -${M_110_211} 1 critical test, 1 passed, 0 failed\n 2 tests total, 1 passed, 1 failed -${M_101_211} 1 critical test, 0 passed, 1 failed\n 2 tests total, 1 passed, 1 failed -${M_000_211} 0 critical tests, 0 passed, 0 failed\n 2 tests total, 1 passed, 1 failed
-${USAGE_TIP}  \n\nTry --help for usage information.
-
-*** Test Cases ***
-
-
-
-Help
-    ${rc}  ${help} =  Run And Return Rc And Output  ${REBOT} --help 2>&1
-    Should Be Equal  ${rc}  ${251}
-    Log  ${help.replace(' ','_').replace('\\t','_'*8)}
- Should Start With ${help} Rebot -- Robot Framework Report and Log Generator\n \n Version: \ - Should End With ${help} \n\n# Running 'robot/rebot.py' directly and creating combined outputs.\n $ python /path/robot/rebot.py -N Project_X -l x.html -r x.html outputs/*.xml\n
-    Should Not Contain  ${help}  ERROR
- @{lines} = Evaluate [ '%d\\t%s' % (len(line), line) for line in ${help.splitlines()} ]
-    Log Many  @{lines}
- @{long} = Evaluate [ line for line in ${help.splitlines()} if len(line) - line.count('\\\\') >= 80 ]
-    Log Many  @{long}
-    Should Be True  len(@{long}) == 0  Too long (>= 80) help line(s)
-    ${help2} =  Run  ${REBOT} -h 2>&1
-    Should Be Equal  ${help}  ${help2}
-
-Version
- ${rc} ${output} = Run And Return Rc And Output ${REBOT} --version 2>&1
-    Should Be Equal  ${rc}  ${251}
-    Log  ${output}
- Should Match Regexp ${output} ^Rebot (2\\.\\d+(\\.\\d+)?( (alpha| beta|rc)\\d*)?|trunk 2\\d{7}) \\([PJ]ython 2\\.[\\d.]+ on .+\\)$
-    Should Be True  len("${output}") < 80  Too long version line
-
-Argument File
- Create File ${MYOUTDIR}${/}a.txt --name From_Arg_File\n -c c1\n # comment line\n --log none\n -r none\n --output ${MYOUTDIR}${/}output.xml\n ${MYINPUT} - ${output} = Run ${REBOT} --critical c2 --argumentfile ${MYOUTDIR}${/}a.txt 2>&1
-    Should Not Contain  ${output}  ERROR
-    Process Output  ${MYOUTDIR}${/}output.xml
-    Should Be Equal  ${SUITE.name}  From Arg File
-    Should Be True  ${SUITE.critical.tags} == []
-
-Setting Syslog File
-    Set Environment Variable  ROBOT_SYSLOG_FILE  ${MYOUTDIR}${/}syslog.txt
-    Rebot Something
-    File Should Not Be Empty  ${MYOUTDIR}${/}syslog.txt
-    Remove File  ${MYOUTDIR}${/}syslog.txt
-    Delete Environment Variable  ROBOT_SYSLOG_FILE
-    Rebot Something
-    File Should Not Exist  ${MYOUTDIR}${/}syslog.txt
-    Set Environment Variable  ROBOT_SYSLOG_FILE  none
-    Rebot Something
-    File Should Not Exist  ${MYOUTDIR}${/}syslog.txt
-    [Teardown]  Delete syslog environment variables
-
-Setting Syslog Level
-    Set Environment Variable  ROBOT_SYSLOG_FILE  ${MYOUTDIR}${/}syslog.txt
-    Set Environment Variable  ROBOT_SYSLOG_LEVEL  INFO
-    Rebot Something
-    ${size1} =  Get File Size  ${MYOUTDIR}${/}syslog.txt
-    Set Environment Variable  ROBOT_SYSLOG_LEVEL  DEBUG
-    Rebot Something
-    ${size2} =  Get File Size  ${MYOUTDIR}${/}syslog.txt
-    Should Be True  0 < ${size1} <= ${size2}
-    Set Environment Variable  ROBOT_SYSLOG_LEVEL  warn
-    Rebot Something
-    File Should Be Empty  ${MYOUTDIR}${/}syslog.txt
-    [Teardown]  Delete syslog environment variables
-
-
-*** Keywords ***
-Delete syslog environment variables
-    Delete environment variable  ROBOT_SYSLOG_FILE
-    Delete environment variable  ROBOT_SYSLOG_LEVEL
-
-My Setup
-    Run Tests Without Processing Output  ${EMPTY}  ${TESTFILE}
-    Move File  ${OUTFILE}  ${MYINPUT}
-    Create Directory  ${MYOUTDIR}
-
-Remove Temps
-    Remove Directory  ${MYOUTDIR}  recursively
-    Remove File  ${MYINPUT}
-
-Directory Should Contain
-    [Arguments]  ${dir_path}  @{exp_files}
-    ${act_files} =  List Directory  ${dir_path}
-    Should Be Equal  ${act_files}  ${exp_files}
-
-Test Critical
- [Arguments] ${opts} ${input} ${status} ${msg} ${crit_tags} ${crit1} ${crit2}
-    Set Suite Variable  $SUITE  ${None}
-    Run Rebot  ${opts}  ${input}
-    Should Be Equal  ${SUITE.status}  ${status}
-    Should Be Equal  ${SUITE.get_full_message()}  ${msg}
-    Should Be True  ${SUITE.critical_tags} == ${crit_tags}
-    Should Be Equal  ${SUITE.tests[0].critical}  ${crit1}
-    Should Be Equal  ${SUITE.tests[1].critical}  ${crit2}
-
-Rebot Something
-    Run  ${REBOT} --outputdir ${MYOUTDIR} ${MYINPUT}
-
-

Reply via email to