This article is the 19th day article of selenium_and_appium Advent Calendar 2016.
This is the first post! This is TEISHISEI! Write without fear of misunderstandings!
My company has a lot of different services, and there are testers for that. Forever, check for broken links, lick all pages to take screenshots, and marathon until a probable event occurs. Selenium automates that kind of testing. The more you dig up, the more projects you need to automate. Now I need to write code for Eternity and Selenium. I thought it also needed automation. I sought to find a way for everyone to build tests, even if they weren't programmers. Below is a summary of the required requirements.
--First, the user is not a programmer, with as little prerequisite knowledge as possible --Being able to record browser operations --Editing should be GUI ――I want to write if and loop processing --Cross browser
We've explored Selenium IDE, Selenium Builder, imacros and a variety of other solutions. Each had its advantages and disadvantages, and one had a wall. In the case of games, loops are required for marathons, stamina is restored, if is required due to accumulated requests, and finally it is necessary to teach how to use if statements. If it is a step that does not correspond to the output, an error will occur, and I am tired of having steps to cut If it is not cross-browser, or if it is fine, you can not delete all steps at once, or you need to click three times to press the delete button. Do you want to send a request to an external API? Requests have increased.
So I decided to make it. Its name is Selenium Code Builder Yes, we redeveloped the wheels. Far from redevelopment, there is no way to do it within the extension. As the name implies, it builds ** Code **. Write test code and run it in Ruby or Python. (Windows is easier to build in python environment, so it can be output in python as well.)
Of course, I don't think it's better than other tools, but it has the advantage of being able to quickly catch up and update requests. I am satisfied with the usability and the ability to incorporate if and loop processing. This time, it will be open source, so I hope that more people will come into contact with Selenium, so I will share it.
It is a Chrome extension that assembles and outputs browser test code using Selenium with GUI. The output test code is compatible with the following languages and browsers.
language
Browser that can be executed
I'm sorry, it's not a public extension yet, so you'll have to build it manually.
$ npm install -g bower gulp
$ npm install
$ bower install
$ gulp build
--Open Chrome --Menu
You can record the operation of the browser. The operations that can be recorded are as follows.
--Go URL
You can save and load files (json) and convert to Ruby or Python. When converting, you can choose Chrome, firefox, Android version and browser.
--Go to the specified page --Move to the specified page with basic authentication --Browser back, forward, reload --Get the current url
By actually clicking the element, you get the css selector and judge the element.
--Click the element --Double click on the element --Clear input element --Input to input element --key event transmission --Enter in the checkbox
--Run javascript --Taking screenshots --Specified px scroll --Resize browser window --Get json data while displaying --Press OK on window.alert --Press Cancel in window.alert --Enter in window.prompt --Get the characters in window.alert
--Code execution --Sleep
--Value validation --Regular expression validation of values --Verify that the current page has the specified text
--Search tool to find out how many specified selectors are on the page --Mechanism to divide into multiple files and run one web driver --Take the whole screenshot with chromedriver
The user tried to make the threshold as low as possible because he was not a programmer, but there were still some that could not be wiped. I'm glad that I was able to make it known that there is an option called Selenium, there is a usage that is not in the frame of testing, and I was able to reduce some man-hours. I hope E2E will continue to develop in the future.
The next article is also me. Sorry for the boring article, but please keep in touch!
Recommended Posts