softest
Softest is a simple test tool for recording browser interactions and generating test scripts. Lets you get test scripts without writing a line of code.
Making: github.com/prprprus/so…
Your help means a lot to me, welcome Star ⭐, Fork, submit Issue or PR, thank you! 😁 😘 🎁 🎉
The other project
When I needed a tool that could automatically generate corresponding code based on browser interactions, I found Puppeteer-Recorder and Selenium IDE, which are certainly excellent projects. However, in practical use, they can only record with a single TAB, do not support multiple tabs, do not support screenshots, etc., and Selenium IDE always reported errors when playing scripts (probably with scrolling support), so we built our own wheel.
function
Supported functions
- Single TAB recording
- Multi-tab recording
- Screen capture
- Generating test scripts
- Download the test report (including screenshots and test scripts)
The installation
$ npm i -g softest
Copy the code
Softest is built on Puppeteer, and Chromium is installed by default when Puppeteer is downloaded. If you see the image below when executing the above command and cannot download Chromium for any reason, you can download it here and extract code 4vxu.
use
To facilitate command execution, you are advised to add environment variables:
$ export PATH=$PATH:$HOME/.npm-global/bin
Copy the code
To run softest, you need to specify the directory where Chromium is located, and specify the directory (the absolute path) to save the test report.
$ soft -c PATH_CHROMIUM -r PATH_REPORT
Copy the code
If you don’t know what directory Chromium is in, launch Chromium and type chrome://version/ in the address bar to find the directory where its executable is located.
If you see output similar to the following, you are successful 🎉🎉🎉👏
_______ _______ _______ _______ _______ _______ _______ | || || || || || || | status: running | _____|| _ || ___||_ _|| ___|| _____||_ _| host: 127.0.0.1 | | _____ | | | | | | ___ | | | | ___ | | _____ | | port: _ - 2333 | _____ | | | | | | ___ | | | | ___ | | _____ | | | _____ | | | | | | | | | | _____ _____ | | | | |... | |... | | ___ | | ___ | |... | |... | | ___ | 🎉 Running WebSocket server successfully 🎉 HTTP server Running successfullyCopy the code
Open your browser, type host and port, and you’ll see the following web interface: