Robot Framework 2.8 rc 1

76 views
Skip to first unread message

Pekka Klärck

unread,
May 31, 2013, 10:08:08 AM5/31/13
to robotframework-users, robotframew...@googlegroups.com
Hi all,

Lot of hard work has been put into Robot Framework 2.8 and the first
release candidate is now available. Most important new features in the
release are:

- Public API for creating and executing test cases programmatically.
- New library for executing processes.
- Unified named argument handling and support for Python's keyword arguments.
- More control flow related keywords (Pass Execution, Return From
Keyword, Continue For Loop).

See the release notes [1] for more information about the new features,
fixes, and other changes. Release notes will get more information
before the final release, and also some of the new feature,s as well
as the new APIs,b are still yet to be documented. Otherwise all
features planned for the release ought to be ready.

Release packages are available on the download page [2]. If you use
pip (or easy_install), you ought to get the new version using a
command like `pip install --upgrade robotframework`. Notice that you
need to use `pip install robotframework==2.7.7` to get the latest
stable release.

[1] http://code.google.com/p/robotframework/wiki/ReleaseNotes28
[2] http://code.google.com/p/robotframework/downloads/list

The final 2.8 release is planned for Monday 10th of June. Please help
us to test the new version before that!!

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Pekka Klärck

unread,
Jun 3, 2013, 7:36:10 PM6/3/13
to guy....@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
2013/6/3 Guy Kisel <guy....@gmail.com>:
> I have an issue related to the named argument changes (specifically
> https://code.google.com/p/robotframework/issues/detail?id=1325), but I'm not
> sure how best to resolve it:
>
> I have a keyword named 'Validate XML Result' that takes the following
> arguments:
> ${result_getter} | ${tag_name} | ${expected_value} | ${msg}=XML value assertion failed | @{args}
>
> When I try to use it in RF 2.8, I get the following error:
>
> +---- START KW: global_keywords.Validate XML Result [ Get Share Access |
> access | ${access_mode} | msg=Share access validation failed! |
> share_name=${sharename} | username=${username} ]
> Keyword 'global_keywords.Validate XML Result' got positional argument after
> named arguments.
> +---- END KW: global_keywords.Validate XML Result (1)
>
>
> What's the best way to rewrite this keyword (or my usage of it) in order to
> be compatible with RF 2.8?

A pretty easy fix/workaround for this problem is escaping the named
argument syntax like `name\=the value`. As I just commented the issue
that Kevin had submitted [1], we can also reconsider some of the
changes to handling named arguments if this turns out to be a common
problem.

[1] https://code.google.com/p/robotframework/issues/detail?id=1452

Finally, why are you passing msg argument using the named argument
syntax? Because there are non-named arguments after it, the your final
will contain the `msg=` prefix in RF 2.7. That will not change even if
we decide to make the above valid syntax otherwise.

Cheers,
.peke

PS: I hope I have more time tomorrow to comment other questions in
this thread and in the group in general.

Jussi Malinen

unread,
Jun 4, 2013, 5:22:00 AM6/4/13
to rica...@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
Right, I forgot to upload that. The jar distribution is now in downloads: http://code.google.com/p/robotframework/downloads/list

Thanks,
Jussi


On Jun 1, 2013, at 1:14 AM, Ricardo Cardona R <rica...@gmail.com> wrote:

Where i get Standalone JAR distribution file?
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jussi Malinen

unread,
Jun 4, 2013, 5:31:08 AM6/4/13
to stl...@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
Hi!

Answers below:

On Jun 3, 2013, at 2:55 PM, Stefan Lecho <stl...@gmail.com> wrote:

-Will the Maven Plugin be updated before or after the final 2.8 release ?

The Maven Plugin release will be made right after the final 2.8 release.

-Will there be a 'Java-based public API' or only a 'Python-based public API' ?

The public api is python based, you will have to access it through Jython from Java. (There already is a separate Java api for starting the test run, but you need to run existing test files when using that.)

-Will this Public API facilitate the execution of Robot Test Cases as JUnit Test Cases (to get Java code coverage) ?


This new API is a python API. (As Robot is written in python…)

Cant you just execute normal robot test cases and get coverage for those test runs? Remember that you can use the already exiting java api to start a test run if you have existing robot test suite files.

Cheers,
Jussi


Pekka Klärck

unread,
Jun 4, 2013, 5:40:34 AM6/4/13
to guy....@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
2013/6/4 Guy Kisel <guy....@gmail.com>:
> I'm not sure I understand what you're saying.

Sorry for not being more clear. Had burnt too much midnight oil when replying.

> Is the problem that the msg
> argument has a default value in the keyword definition, or is the problem
> that I'm calling it with the named argument syntax in my test case? If it's
> the latter, then you're right, this is my problem and I can fix it easily. I
> think it was just written that way for clarity.

I meant the latter problem. If I understood your example correctly,
the message ended up being literal `msg=Share access validation
failed!`, including the `msg=` prefix. That's because prior to 2.8
named argument syntax was only used with the last arguments, and using
`name=value` syntax anywhere else had no special meaning. This lead to
somewhat strange behavior, and thus we decided make the rules of
parsing named arguments stricter in 2.8 while enhancing named argument
syntax in general. Possible fixes to your problem include:

1) Remove the offending prefix. You'll get just '`Share access
validation failed!` message which is likely what you wanted in the
beginning.
2) If you want to keep the prefix, even though it is added to the
message, escape it like `msg\=Share access validation failed!`.
3) Alternatively you could use a prefix that doesn't match arguments
you use, for example `message=Share access validation failed!`..

The problem Kevin reported isn't actually exactly the same as this
problem. In his case the keyword that was executed inside Run Keyword
expected an argument in format `name=something` and named argument
syntax was not supposed to be used at all. This failed because Run
Keyword itself has an argument named `name`, and thus using
`name=anything` was considered to be named argument usage. There are
two possibilities how to fix this:

1) Escape the syntax like `name\=something`. Can be a bit annoying.
2) We change Run Keyword variants so that they don't support named
argument syntax themselves. This means that you cannot use `| Run
Keyword | name=No Operation |`, but that isn't a big loss (and it
didn't work in 2.7 either). I'm stating to feel this is a good idea to
do before the final release.

Cheers,
.peke

Pekka Klärck

unread,
Jun 4, 2013, 3:08:58 PM6/4/13
to guy....@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
2013/6/4 Guy Kisel <guy....@gmail.com>:
> Thank you very much for the detailed comments and explanation. I went with
> fix #1 from your list. I now understand the issue you're describing and why
> you made the changes you did, and it does make sense.

Good to hear that you agree with the change even though it caused
extra work for you. Here is the original issue describing the change
in more detail:
https://code.google.com/p/robotframework/issues/detail?id=1325

The related problem that Kevin had submitted is now fixed:
https://code.google.com/p/robotframework/issues/detail?id=1452

Thanks to you both, and everyone else, who has tested 2.8rc1 and
provided valuable feedback!

Pekka Klärck

unread,
Jun 5, 2013, 2:55:34 AM6/5/13
to pvsh...@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
2013/6/3 Prashant <pvsh...@gmail.com>:
> Great work and congrats for v2.8.

Thanks!

> Just curious and looking forward on using Public API to create and execute
> test cases. Can you please let m know if you are thinking of something like
> using nose test (or py.test) and the execution of it will create RF style
> logs. I am referring here Mikko's idea mentioned in issue# 825

Do I got it right that you'd like to get Robot compatible reports from
nose and other unit level tools? That's not why the new running APIs
were created and they don't really help there either.

The new APIs allow creating Robot tests programmatically instead of
using the normal test data syntax. The main motivation was to allow
external tools with their own test data syntax to create Robot tests.
For example, model based testing tools could have their own models
that they can use to create tests.

> Currently I am playing with idea of extending py.test junitxml plugin to
> generate RF style xml output. I am thinking of having similar test result
> output for end-to-end test case automation using RF and any modular,
> component level programmatic test automation using py.test.

This sounds like a good approach and shouldn't be too complicated to
implement. Robot's output XML syntax is documented here:
http://code.google.com/p/robotframework/wiki/RobotOutputXml

Pekka Klärck

unread,
Jun 5, 2013, 3:00:03 AM6/5/13
to rica...@gmail.com, robotframe...@googlegroups.com, robotframew...@googlegroups.com
2013/6/4 Ricardo Cardona R <rica...@gmail.com>:
> Hi all,
>
> About "Public API for creating and executing test cases programmatically."
>
> I have 2 questions:
>
> Is it possible to add new test cases to a running test suite?
> Is it possible to add new keywords to a running test case?

The former ought to be possible although I haven't tested it.
Unfortunately the latter is not, but I hope that this limitation is
lifted latest in RF 2.9.

Are you thinking about possibilities for model based testing in online mode?

Pekka Klärck

unread,
Jun 12, 2013, 2:25:49 AM6/12/13
to pvsh...@gmail.com, robotframework-users, robotframew...@googlegroups.com
2013/6/5 Prashant Shewale <pvsh...@gmail.com>:
>
> Can you please let me know which part of RF I can reuse for generating RF
> style reports (output xml) ? Currently I am looking at XmlLogger,
> ResultWriter etc.

ResultWriter ought to be enough. Recently enhanced API docs have an
example here:

https://robot-framework.readthedocs.org/en/2.8/autodoc/robot.running.html
Reply all
Reply to author
Forward
0 new messages