Guest Post: Testing JavaScript with Yeti and Sauce Labs WebDriver with Ryuichi Okumura
Sauce AI for Test Authoring: Move from intent to execution in transactions.|xBack to ResourcesBlogPost
Sauce AI for Test Authoring: Move from intent to execution in transactions.
|
x
Blog
Guest Post: Testing JavaScript with Yeti and Sauce Labs WebDriver with Ryuichi Okumura
When we read YUI contributorRyuichi Okumura& # x27; s blog post on testing JavaScript with Yeti and Sauce, we reckon it was an awesome use of Sauce, and wanted to share it with you. Ryuichi kindly gave us the green light to post-cross this, so read on to hear about how he & # x27; s using Sauce for JS examination, and assure out hisTwitter and Github. We & # x27; ve latterly been rather fussy develop a number of JavaScript testing environments, such as test frameworks and trial runners.Yeti, acquire by the YUI team, is one of the test runner. As for the usable test frameworks, Yeti supports the major libraries—not only YUI Test, but QUnit, Jasmine, and Mocha. I & # x27; ve evidence exemplar previously where Yeti and QUnit were used together.
On top of JavaScript try, we can & # x27; t forget the device and browser on which the examination is being done in the first spot. With the spread of so many different types of mobile devices and so many OSes and browsers in development, it & # x27; s become significant to carry out trial on the actual browsers. In these conditions, service get look that allow you to open and operate the actual browsers online. Today, I & # x27; d like to show you a tryout using one of those services,Sauce Labs. Sauce Labs is a cloud service that offers many different mobile and desktop browser environments. Also, one of Sauce Labs & # x27; major lineament is that it endorse Selenium testing with the WebDriver protocol. Just like Yeti, since WebDriver protocol is supported, you can reboot the browser on the cloud through the command line and run a JavaScript exam. First, You can ratify up easy Sauce Labs account if you doesn & # x27; t have a Sauce Labs account. Sauce Labs provides some free and paid plans. Also there is & quot; Open Sauce & quot; plan, this is very kind and helping plan for OSS developer like you. Sign up when you & # x27; re done, let & # x27; s cook for the testing environment. Check your access key and downloadSauce-Connect.jarfile from. Start Sauce Connect:
java -jar Sauce-Connect.jar & lt; username & gt; & lt; accesskey & gt;
Install Yeti via npm dictation if you haven & # x27; t install yet.
SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.
npm install -g yeti
Start Yeti hub server while specify Sauce Labs WebDriver terminus:
yeti -- waiter -- wd-url http: // & lt; username & gt;: & lt; access key & gt; @ ondemand.saucelabs.com:80
Yeti Hub started. LAN: http: //10.0.1.13:9000
Local: http: //localhost:9000
And, Launch browser you like while define a test file:
yeti -- browser chrome src/date/tests/unit/ * .html
Waiting for Hub to launch browsers ...
Agent connected: Chrome (26.0.1410.64) / Windows 7 from 10.0.1.13
✓ Testing started on Chrome (26.0.1410.64) / Windows 7
✓ Agent completed: Chrome (26.0.1410.64) / Windows 7
✓ 22 tests pass! (35 sec)
Agent disconnect: Chrome (26.0.1410.64) / Windows 7 from 10.0.1.13
That & # x27; s all. It & # x27; s capable to quiz on the browser in the cloud even if you don & # x27; t have it!
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free