Comments (5)
Hi @Anker101,
I have some questions about this:
- If I understand correctly environment variables always start with
%{
in robot framework, so I can use that to identify them? - I can make the manager evaluate the environment variable on the machine that the manager is running on, which will be fine for evaluating the robot file and identifying which files need to be transferred to the agent, the question is how to make sure the agent will have an appropriate value for this environment variable or if this environment variable even exists on the agent?
- should I expect that you will ensuring the environment variable will be set on all the agents?
- should t make the manager tell the agents to create this variable?
- should the agents set the value of the variable to the same value as on the manager?
- further if the variable value is a path and the agent is a different platform to the manager the value might not even be relevant, e.g. a value of "D:\myproject\my test case" on a windows manager obviously would have no value on a Linux or MacOS agent.
I'm leaning towards just evaluating the value when assessing the files to be transferred to the agent but not attempting to ensure the agents have this environment variable set, but would be interested in your feed back.
Something to remember the manager never runs robot framework, in fact there is no requirement to even have robot framework installed on the manager machine only on the agent machine. as such the manager needs to be updated to know how to evaluate variables, In this case the operating system environment variables should be easy enough to implement but I don't expect to be able to implement all possible variables in robot framework. I'm happy to implement this feature request as long as it's limited to just environment variables.
from rfswarm.
Hi @damies13
1 ) Yes, in Robot Framework, environment variables typically start with %{, so using this pattern to identify them should work effective
2) With an export RF_DIRECTORY done before executing the manager
3) I think it is more stable to make the manager tell the agents to create this variable
Hope it helps
Regards
from rfswarm.
- I think it is more stable to make the manager tell the agents to create this variable
Maybe I tell the agent to create it if it doesn't exist, that way we don't override it if it does exist, that would resolve the concern.
Another option might be add an option in the manager UI to tell the agent whether to create the variable or not.
from rfswarm.
Hmmm maybe this is part of the solution:
import re
#Return a list containing every occurrence of "ai":
txt = "%{RF_DIRECTORY}${/}folder${/}file.resource"
x = re.findall("%{([^}]+)}", txt)
print(x)
from rfswarm.
Fixed linter issues and merged into v1.4.0 branch
from rfswarm.
Related Issues (20)
- Ability to run Agent as a daemon (service)
- RFSWARM-Reporter - Does not pick up the start / end time of a test run when using a saved template. HOT 5
- Listener errors with RF 7.0.1 HOT 3
- Donation Reminder HOT 1
- Not all CSV report files are generated after clicking CSV Report button HOT 6
- Saving a Reporter template file in Windows does not work correctly HOT 2
- Resource files located in separate folder cannot be found HOT 16
- When the Agent is stopped. The Agent is not removed from the Manager while the test is running and the number of robots does not deprecate to 0. HOT 1
- Python files in Tests dir HOT 1
- Code cleaning: C0209-[consider-using-f-string]
- Code cleaning: W0622-[redefined-builtin]
- Code cleaning: R1705-[no-else-return]
- Code cleaning: W0613-[unused-argument]
- Code cleaning: W0201-[attribute-defined-outside-init]
- Code cleaning: C0201-[consider-iterating-dictionary]
- Code cleaning: R1710-[inconsistent-return-statements]
- Code cleaning: C0206-[consider-using-dict-items]
- Code cleaning: W0612-[unused-variable]
- Code cleaning: W0212-[protected-access]
- Change in super-linter fail-under from 9.0 to 10.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfswarm.