ldtri0209 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Named and keyword argument handling documentation improvements #1430

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Named and keyword argument handling has changed in 2.8 and needs to be 
documented in user guide.

Issue 1324, issue 1115, issue 1383, and issue 1325 describe the changes.

Original issue reported on code.google.com by jussi.ao...@gmail.com on 10 May 2013 at 12:24

GoogleCodeExporter commented 9 years ago

Original comment by anssi.sy...@eficode.com on 31 May 2013 at 12:54

GoogleCodeExporter commented 9 years ago
At least the following doc changes are are needed in the UG:

1) Rewrite section about using named arguments syntax.
- Don't focus only to default values.
- Explain that syntax works with other libraries that Java.
- Explain that using positional after named causes error.
- Escaping.
- Note to end about changes in 2.8 (no defaults needed, dynamic libs supported, 
parsing changes, ...)

2) Add a new section about using **kwargs. Link to Run Process as an example 
might be a good idea (although Process lib may not even be included into UG 
yet).

3) In library API chapter, document that dynamic libs support named args. 
Preferably with an example.

4) Also in library API chapter, document how Python libs can use **kwargs.

Original comment by pekka.klarck on 5 Jun 2013 at 10:52

GoogleCodeExporter commented 9 years ago
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#named-arguments
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#free-keyword-arguments
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#python-kwargs
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#getting-keyword-arguments

Original comment by jussi.ao...@gmail.com on 6 Jun 2013 at 9:25

GoogleCodeExporter commented 9 years ago
How does this look?

Original comment by jussi.ao...@gmail.com on 6 Jun 2013 at 9:25

GoogleCodeExporter commented 9 years ago
This issue was updated by revision cdd4b4c6e190.

Enhanced the documentation of named and kwargs. With kwargs decided to move all 
code examples under Creating test libraries.

Proofreading dynamic lib related changes still to-be-done.

Original comment by pekka.klarck on 9 Jun 2013 at 2:01

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 92eeae4efb16.

Named args w/ dyn libs is now also done. I ended up writing a whole new section 
about the topic.
This commit contains also some other enhancements related to named and kwards.

Original comment by pekka.klarck on 9 Jun 2013 at 2:01

GoogleCodeExporter commented 9 years ago
Below is an updated list of the sections related to these changes. Someone with 
fresh eyes to this topic and this text should still proofread them. Otherwise 
this issue can be considered done.

Creating test cases:
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#named-arguments
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#free-keyword-arguments

Creating test libraries:
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#free-keyword-arguments-kwargs
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#getting-keyword-arguments
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#named-argument-syntax-with-dynamic-libraries

Original comment by pekka.klarck on 9 Jun 2013 at 2:06

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 0de04ac12f05.

Proofread and fixed a couple of typos.

Original comment by anssi.sy...@eficode.com on 10 Jun 2013 at 2:48

GoogleCodeExporter commented 9 years ago

Original comment by anssi.sy...@eficode.com on 10 Jun 2013 at 2:48

GoogleCodeExporter commented 9 years ago
Issue 1455 demonstrated that we haven't documented how to use variables with 
named args. There are two points:

1) If either scalar or list variable contains value like `name=value`, it will 
never be considered to be named argument. That was the root cause in issue 1455.

2) Using variables like `name=${var}` and `name=${two} ${vars} and other stuff` 
works as expected. In the former case `name` argument will get the value of the 
${var} as-is so it can be also an object, not only a string.

Original comment by pekka.klarck on 10 Jun 2013 at 8:11

GoogleCodeExporter commented 9 years ago
A new chapter about named arguments with variables in 
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.ht
ml#named-arguments

Closing this as done.

Original comment by jussi.ao...@gmail.com on 11 Jun 2013 at 10:03