Describe
From UBot Studio
(Difference between revisions)
(One intermediate revision by one user not shown) | |||
Line 6: | Line 6: | ||
'''What are we describing:''' The unit test suite being tested. For example, a unit test suite labeled "UBot Playground Captcha" will contain tests related to the Captcha on the UBot | '''What are we describing:''' The unit test suite being tested. For example, a unit test suite labeled "UBot Playground Captcha" will contain tests related to the Captcha on the UBot | ||
− | + | The [[UI log view]] command is added to allow the results of the test to display on the UI. | |
== Example == | == Example == |
Latest revision as of 14:38, 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 are we describing: The unit test suite being tested. For example, a unit test suite labeled "UBot Playground Captcha" will contain tests related to the Captcha on the UBot
The UI log view command is added to allow the results of the test to display on the UI.
[edit] 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">)) } }
Running the script will log the describe message and run the It and Expect commands within it.