Running the LUTF
Widget Connector | ||||||
---|---|---|---|---|---|---|
|
Video Transcript
Introduction
Hello, this is Amir Shehata with another quick tip for the LUTF.
Now that we have a general understanding of what the LUTF is, how to build it, deploy it and configure it, let's get our hands dirty and run it.
Environment Variables
There are three environment variables we need to set in order to run the LUTF:
...
Once you have the environment variables set, you'll need to create a YAML configuration file to give to the LUTF on start up. We went over the YAML configuration file in a previous tutorial. For today you can download a sample YAML configuration file for the agent and the master from the Wiki paged linked below.
Running the LUTF
Alright, now we're ready to start the LUTF:
...
Right off the bat let's see what we can learn about our test setup.
Suites
First of all the LUTF gives us a simple way to look at all the existing suites. By using suites.dump()
you get a list of suites.
...
This comes in handy while actively developing test cases.
Scripts
Second, we can see all the scripts under a specific suite. I'm going to use my samples suite for this demonstration:
...
Code Block |
---|
suites['samples'].reload() |
The me
Variable
We can also display a bunch of information about this node. There is a me
variable available which gives us some information about the node we're running on.
...
Why is all this interesting? Well because a script can just access the "me" variable and get all the basic information it needs about a node in a very simple way. Not only can a script access the local me variable, but it can also access the remote me variable and get all the info it needs about the remote. The script will look exactly the same in both cases. This makes writing test scripts very straight forward as we will see later on.
The agents
variable
Beside information about the local node, we can find out who's connected to us. You can do that by:
...
Code Block |
---|
lutf>>> agents.dump() RCLIENTS: id: 0 ip: 192.168.122.100 node-type: MASTER telnet-port: 8181 |
Conclusion
That concludes our initial active tour of the LUTF. In the next tutorial we'll start looking at how to write and run scripts.