2 new revisions:

Revision: c8eb6c32f3f5
Branch:   default
Author:   Anssi Syrjäsalo
Date:     Tue May 28 06:28:33 2013
Log:      Implemented --dryrun...
http://code.google.com/p/robotframework/source/detail?r=c8eb6c32f3f5

Revision: f67fa16c38dc
Branch:   default
Author:   Anssi Syrjäsalo
Date:     Tue May 28 06:28:38 2013
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=f67fa16c38dc

==============================================================================
Revision: c8eb6c32f3f5
Branch:   default
Author:   Anssi Syrjäsalo
Date:     Tue May 28 06:28:33 2013
Log:      Implemented --dryrun

Update issue 1445

Implemented --dryrun.
http://code.google.com/p/robotframework/source/detail?r=c8eb6c32f3f5

Added:
 /atest/robot/cli/dryrun/deprecated_dryrun.txt
Modified:
 /atest/robot/cli/dryrun/dryrun.txt
 /src/robot/conf/settings.py
 /src/robot/run.py

=======================================
--- /dev/null
+++ /atest/robot/cli/dryrun/deprecated_dryrun.txt       Tue May 28 06:28:33 2013
@@ -0,0 +1,114 @@
+*** Settings ***
+Suite Setup Run Tests --runmode dryrun cli/dryrun/dryrun.txt cli/dryrun/more_tests.txt
+Force Tags      regression  pybot  jybot
+Resource        atest_resource.txt
+
+*** Test Cases ***
+
+Passing keywords
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  3
+    Name and status should be  ${tc.kws[0]}  BuiltIn.Log  NOT_RUN
+ Name and status should be ${tc.kws[1]} \${contents} = OperatingSystem.List Directory NOT_RUN
+    Name and status should be  ${tc.kws[2]}  resource.Simple UK  PASS
+    Name and status should be  ${tc.kws[2].kws[0]}  BuiltIn.Log  NOT_RUN
+
+Keywords with embedded arguments
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  2
+    Name and status should be  ${tc.kws[0]}  Embedded arguments here  PASS
+ Name and status should be ${tc.kws[0].kws[0]} BuiltIn.No Operation NOT_RUN
+    Name and status should be  ${tc.kws[1]}  Embedded args rock here  PASS
+ Name and status should be ${tc.kws[1].kws[0]} BuiltIn.No Operation NOT_RUN
+
+Keywords that would fail
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  3
+    Name and status should be  ${tc.kws[0]}  BuiltIn.Fail  NOT_RUN
+    Name and status should be  ${tc.kws[1]}  resource.Fail In UK  PASS
+    Should have correct number of keywords  ${tc.kws[1]}  2
+    Name and status should be  ${tc.kws[1].kws[0]}  BuiltIn.Fail  NOT_RUN
+    Name and status should be  ${tc.kws[1].kws[1]}  BuiltIn.Fail  NOT_RUN
+
+Scalar variables are not checked in keyword arguments
+ [Documentation] Variables are too often set somehow dynamically that we cannot expect them to always exist.
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Name and status should be  ${tc.kws[0]}  BuiltIn.Log  NOT_RUN
+    Name and status should be  ${tc.kws[1]}  BuiltIn.Log  NOT_RUN
+
+List variables are not checked in keyword arguments
+    [Documentation]  See the doc of the previous test
+    Check Test Case  ${TESTNAME}
+
+Variables are not checked in when arguments are embedded
+    [Documentation]  See the doc of the previous test
+    ${tc}=  Check Test Case  ${TESTNAME}
+ Name and status should be ${tc.kws[0]} Embedded \${TESTNAME} here PASS + Name and status should be ${tc.kws[0].kws[0]} BuiltIn.No Operation NOT_RUN
+    Name and status should be  ${tc.kws[1]}  Embedded \${nonex} here  PASS
+ Name and status should be ${tc.kws[1].kws[0]} BuiltIn.No Operation NOT_RUN
+
+User keyword return value
+    Check Test Case  ${TESTNAME}
+
+Test Setup and Teardown
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  1
+    Should Be Equal  ${tc.setup.name}  BuiltIn.Log
+    Should Be Equal  ${tc.teardown.name}  Does not exist
+
+Keyword Teardown
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  1
+    Should Be Equal  ${tc.kws[0].kws[1].name}  Does not exist
+
+For Loops
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should have correct number of keywords  ${tc}  3
+    Should have correct number of keywords  ${tc.kws[0]}  1
+    Should have correct number of keywords  ${tc.kws[0].kws[0]}  2
+    Should have correct number of keywords  ${tc.kws[1]}  3
+    Should have correct number of keywords  ${tc.kws[1].kws[1]}  1
+
+Non-existing keyword name
+    Check Test Case  ${TESTNAME}
+
+Too few arguments
+    Check Test Case  ${TESTNAME}
+
+Too few arguments for UK
+    Check Test Case  ${TESTNAME}
+
+Too many arguments
+    Check Test Case  ${TESTNAME}
+
+Invalid syntax in UK
+    Check Test Case  ${TESTNAME}
+ Check Log Message ${ERRORS[0]} Creating user keyword 'Invalid Syntax UK' failed: Invalid argument '${arg'. ERROR
+
+Multiple Failures
+    Check Test Case  ${TESTNAME}
+
+Invalid imports
+ Check Stderr Contains Importing test library 'DoesNotExist' failed: ImportError: No module named DoesNotExist
+    Check Stderr Contains  Variable file 'wrong_path.py' does not exist
+    Check Stderr Contains  Resource file 'NonExisting.tsv' does not exist
+
+Test from other suite
+    Check Test Case  Some Other Test
+
+Import Library Keyword is Called
+    Check Test Case    ${TESTNAME}
+    Check Syslog Contains  Imported library 'String' with arguments [ ]
+ Check Syslog Contains Imported library 'ParameterLibrary' with arguments [ value | 42 ]
+
+*** Keywords ***
+Should have correct number of keywords
+    [Arguments]  ${test or uk}  ${exp number of kws}
+    Log  ${test or uk.kws}
+ Should Be Equal As Integers ${test or uk.kw_count} ${exp number of kws}
+
+Name and status should be
+    [Arguments]  ${kw}  ${name}  ${status}
+    Should Be Equal  ${kw.name}    ${name}
+    Should Be Equal  ${kw.status}  ${status}
=======================================
--- /atest/robot/cli/dryrun/dryrun.txt  Mon May  6 16:11:48 2013
+++ /atest/robot/cli/dryrun/dryrun.txt  Tue May 28 06:28:33 2013
@@ -1,5 +1,5 @@
 *** Settings ***
-Suite Setup Run Tests --runmode dryrun cli/dryrun/dryrun.txt cli/dryrun/more_tests.txt +Suite Setup Run Tests --dryrun cli/dryrun/dryrun.txt cli/dryrun/more_tests.txt
 Force Tags      regression  pybot  jybot
 Resource        atest_resource.txt

=======================================
--- /src/robot/conf/settings.py Tue May 28 04:50:04 2013
+++ /src/robot/conf/settings.py Tue May 28 06:28:33 2013
@@ -281,17 +281,20 @@


 class RobotSettings(_BaseSettings):
-    _extra_cli_opts = {'Output'        : ('output', 'output.xml'),
-                       'LogLevel'      : ('loglevel', 'INFO'),
-                       'RunMode'       : ('runmode', []),
-                       'RunEmptySuite' : ('runemptysuite', False),
-                       'WarnOnSkipped' : ('warnonskippedfiles', False),
-                       'Variables'     : ('variable', []),
-                       'VariableFiles' : ('variablefile', []),
-                       'Listeners'     : ('listener', []),
-                       'MonitorWidth'  : ('monitorwidth', 78),
-                       'MonitorMarkers': ('monitormarkers', 'AUTO'),
-                       'DebugFile'     : ('debugfile', 'NONE')}
+    _extra_cli_opts = {'Output'             : ('output', 'output.xml'),
+                       'LogLevel'           : ('loglevel', 'INFO'),
+                       'DryRun'             : ('dryrun', False),
+                       'ExitOnFailure'      : ('exitonfailure', False),
+ 'SkipTearDownOnExit' : ('skipteardownonexit', False),
+                       'RunMode'            : ('runmode', []),
+                       'RunEmptySuite'      : ('runemptysuite', False),
+ 'WarnOnSkipped' : ('warnonskippedfiles', False),
+                       'Variables'          : ('variable', []),
+                       'VariableFiles'      : ('variablefile', []),
+                       'Listeners'          : ('listener', []),
+                       'MonitorWidth'       : ('monitorwidth', 78),
+                       'MonitorMarkers'     : ('monitormarkers', 'AUTO'),
+                       'DebugFile'          : ('debugfile', 'NONE')}

     def get_rebot_settings(self):
         settings = RebotSettings(log=False)
@@ -343,7 +346,11 @@

     @property
     def dry_run(self):
-        return any(mode == 'DRYRUN' for mode in self['RunMode'])
+ return self['DryRun'] or any(mode == 'DRYRUN' for mode in self['RunMode'])
+
+    @property
+    def exit_on_failure(self):
+ return self['ExitOnFailure'] or any(mode == 'EXITONFAILURE' for mode in self['RunMode'])


 class RebotSettings(_BaseSettings):
=======================================
--- /src/robot/run.py   Mon May 27 04:52:25 2013
+++ /src/robot/run.py   Tue May 28 06:28:33 2013
@@ -229,6 +229,11 @@
--runemptysuite Executes tests also if the top level test suite is empty. Useful e.g. with --include/--exclude when it is not an error that no test matches the condition.
+    --dryrun              Verifies test data and runs tests so that library
+                          keywords are not executed.
+    --exitonfailure       Stops test execution if a critical test fails.
+ --skipteardownonexit Causes teardowns to be skipped if test execution is
+                          stopped prematurely.
--runmode mode * Possible values are `Random:Test`, `Random:Suite`, `Random:All`, `ExitOnFailure`, `SkipTeardownOnExit`, and `DryRun` (case-insensitive). First three change

==============================================================================
Revision: f67fa16c38dc
Branch:   default
Author:   Anssi Syrjäsalo
Date:     Tue May 28 06:28:38 2013
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=f67fa16c38dc

Modified:
 /src/robot/run.py

=======================================
--- /src/robot/run.py   Tue May 28 05:54:10 2013
+++ /src/robot/run.py   Tue May 28 06:28:38 2013
@@ -229,6 +229,11 @@
--runemptysuite Executes tests also if the top level test suite is empty. Useful e.g. with --include/--exclude when it is not an error that no test matches the condition.
+    --dryrun              Verifies test data and runs tests so that library
+                          keywords are not executed.
+    --exitonfailure       Stops test execution if a critical test fails.
+ --skipteardownonexit Causes teardowns to be skipped if test execution is
+                          stopped prematurely.
--runmode mode * Possible values are `Random:Test`, `Random:Suite`, `Random:All`, `ExitOnFailure`, `SkipTeardownOnExit`, and `DryRun` (case-insensitive). First three change

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to