It
From UBot Studio
(Difference between revisions)
(Created page with " This command is a Unit Testing command in the UBot Studio Extended Library. This command describes the unit test suite being performed. The describe command is a cotain...") |
|||
Line 2: | Line 2: | ||
This command is a [[Unit Testing]] command in the UBot Studio Extended Library. | This command is a [[Unit Testing]] command in the UBot Studio Extended Library. | ||
− | This command describes the unit test suite being performed. The describe command is a | + | This command describes the unit test suite being performed. The describe command is a container for the [[It]] and [[Expect]] commands. |
− | '''What | + | '''What should it do?:''' In a few words, describe what the commands in the It command should do once run. |
− | The [[UI log view]] command is added to allow the results to | + | There can be multiple It commands inside a [[Describe]] command testing multiple processes. The [[Expect]] command is placed inside the it command |
+ | |||
+ | The [[UI log view]] command is added to allow the results of the test to appear on the UI. | ||
== Example == | == Example == | ||
Line 22: | Line 24: | ||
</pre> | </pre> | ||
− | + | The It command runs the process being tested. It | |
Line 28: | Line 30: | ||
− | [[File: | + | [[File:It.jpg]] |
Revision as of 14:54, 4 October 2016
This command is a Unit Testing command in the UBot Studio Extended Library.
This command describes the unit test suite being performed. The describe command is a container for the It and Expect commands.
What should it do?: In a few words, describe what the commands in the It command should do once run.
There can be multiple It commands inside a Describe command testing multiple processes. The Expect command is placed inside the it command
The UI log view command is added to allow the results of the test to appear on the UI.
Example
clear all data ui log view("Unit Tests") describe("UBot Playground Captcha") { it("Should check for captcha completion") { change attribute(<name="ctl00$ContentPlaceHolder1$captcha">,"value",$nothing) type text(<name="ctl00$ContentPlaceHolder1$captcha">,$solve captcha(<src="/assets/captcha.jpg?id=0.7055475">),"Standard") expect($exists(<value="smwm">)) } }
The It command runs the process being tested. It
Running the script will log the describe message and run the It and Expect commands within it.