Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1509 by [email protected]: ROBOT_LIBRARY_SCOPE not working on
Robot Framework 2.8.1
http://code.google.com/p/robotframework/issues/detail?id=1509
Hi,
this might be related to the issue with id 589, in which a similar problem
is said to be fixed in RF 2.5.1.
I didn't manage to make the ROBOT_LIBRARY_SCOPE work, neither using the
MavenPlugin 1.2, nor through Jybot (Robot Framework 2.7 a1 (Jython 2.5.2 on
java1.6.0_31)).
I also tried with the example shown in the RF Guide, but with no success,
that is, the library is instantiated at each test case execution, even
if "GLOBAL" scope was used.
Here follows the example I used.
Subsequent calls to the keyword 'Get Count' within the same test case
return the right sequence 1,2,3..., but if I call it in the next test case,
I obtain again 1.
-------------------------------------------------
@RobotKeywords
public class ExampleLibrary {
public static final String ROBOT_LIBRARY_SCOPE = "GLOBAL";
private int counter = 0;
@RobotKeyword
public String getCount() {
counter += 1;
System.out.println(counter);
return "Count=" + counter;
}
public void clearCounter() {
counter = 0;
}
}
------------------------------------------------
Thanks a lot for your help
Regards
Paolo
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
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.