Suppose you have been using Selenium IDE to record your test cases, and want to set up automated load testing based on your Selenium test project. In that case, you do not need to transfer your test configurations from Selenium to LoadView manually. LoadView supports the import of SIDE files with Selenium test project configurations. To start load testing with Selenium tests, you can import a web application test created in Selenium IDE into LoadView in a few basic steps outlined below in this article.
Selenium Tests into LoadView: Configuring a LoadView Test
Before you begin, you will need to have a LoadView account. You can get started with LoadView for free by signing up here. If you have a LoadView account, you will need to log in to your account. To transmit data, follow these next steps:
- Within the Selenium IDE plugin, save your Selenium test project to a file on a local computer.
- Next, log in to your LoadView account and click New Test on the Test Scenario manager page.
- Add New Target and on the Select a Load Testing Type page, pick the Selenium test type.
- Next, on the test edit screen, click Import and import the file that you saved in the first step. The content of the file will be uploaded into the Selenium Config field. If necessary, you can edit the code in the field.
- Optional: In the Script Timeout field, you can set the maximum time to wait for the script to be executed. If the script execution exceeds the timeout, a script timeout error will be generated and the script execution will continue till it reaches a default script timeout of 15 minutes. If not specified, the default value of 15 minutes is applied.
- Optional: In the Element Timeout field, you can set the maximum time to wait for a target element to be found on the web page. If the time limit is exceeded, an element timeout error will be generated and the script execution will be stopped. The default Element Timeout value is 15 seconds.
- Click Create Test and continue with the load test execution scenario. For a detailed guideline on test scenario setup, see Getting Started with Load Test Setup.
Using Variables in Selenium Load Tests
If you want to use variables in your load test, use the store command to store a variable name and value in Selenium IDE. See the store command described here.
LoadView will recognize the store command in the script and replace the variable value with the values from the CSV file. See how to add a CSV file with variable values to your test scenario in the Uploading Dynamic Variables (Context Parameters) to the Test Scenario.
Use the following CSV file format:
- CSV column headers should contain the names of the variables as they appear in the Selenium script.
- CSV rows should contain values of the corresponding variables.
Load Testing with Selenium Tests: LoadView Timeouts
Sometimes a page load takes longer than expected and some web elements may not appear on a web page immediately. To tackle this problem LoadView waits for a set amount of time (15 seconds by default) for a particular web element to be detected on the web page. If the waiting time exceeds the timeout, the system throws a timeout error and ends the script execution. You can specify this timeout value in the Element Timeout field while configuring your test in LoadView.
Another timeout that is important to consider is a single test case execution timeout. By default, LoadView waits for 300 seconds for each step (test case) from a Selenium script before generating an error unless specified otherwise in the script. You can change the step execution timeout value by editing the script according to your goals.
By default, LoadView limits the script execution time to 15 minutes maximum. Scripts that run longer than 15 minutes will be aborted automatically by the server. If the Script Timeout value has been set and the script execution takes longer than specified by the timeout value, LoadView will generate a timeout error and continue script execution till the default system limit of 15 minutes is reached.
Find LoadView default timeout values below:
- Wait Element Timeout : 15 seconds.
- Step (Test Case) Timeout : 300 seconds.
- Script Timeout : 15 minutes.
If you need any further assistance with converting Selenium tests into the LoadView platform, please contact our technical support team. Our team is available 24/7 to assist with all your load and performance testing needs.
Or if you already have a LoadView account, you can submit a ticket from within the LoadView platform. To submit a support ticket, simply login to your account. From the top right-hand side, hover over Support, then select Tickets to submit a request.
-
Web App Transaction Recording: Selenium IDE vs. EveryStep Scripting Tool
New to web performance testing and don’t know which tool to use to record your first script for web application UI and user experience testing? Let us give you some insight into when to use what.
Selenium Integrated Development Environment (IDE) is a free open-source extension to the Firefox and Chrome browsers and a part of the Selenium suite (Selenium IDE, Selenium RC, WebDriver, Selenium Grid). It is an automated testing tool that allows users to configure, edit and run tests without any programming experience. With Selenium IDE you can record and playback test scripts by using various commands that are supported by a browser engine. Generally, recording your test scenario with Selenium is an easy and fast way to create straightforward test scripts for websites and web applications. However, when it comes to creating test scenarios with more complicated logic it might require additional setup and a good grasp of programming languages.
The EveryStep Web Recorder tool by Dotcom-Monitor allows the recording of any kind of user interaction with a web application or website UI. While the majority of automated testing tools use HTML of a target web page to validate the web page content for specified keywords or images, they often fail when it comes to a dynamic web application built with modern technologies like Flash, HTML5, Java, PHP, Ruby, Silverlight, etc. With EveryStep Web Recorder you are not limited to static web application testing. EveryStep Web Recorder uses a unique Dotcom-Monitor technique of RIA (Rich Internet Application) image recognition. RIA functionality supports recording test scripts for a dynamic web application and enables the identification and monitoring of dynamic web content rendered on the page. Thus, you can easily record complex user actions on websites that use the stack of technologies mentioned above and make sure that web applications respond correctly to user input.
Moreover, with EveryStep Web Recorder you can add parametrization and conditional logic, filter and modify network responses, add text or image validation, etc. without comprehensive programming knowledge. Our users can select from a variety of more than 40 desktop and mobile browsers to test how a web application is performing in different browsers and on different types of devices. Scripts recorded with the EveryStep Scripting Tool can be uploaded into the Dotcom-Monitor for 24/7 monitoring or the LoadView platform for stress testing.
To sum up, if you are looking for an easy-to-use tool to create more advanced scripts, EveryStep Web Recorder is the better choice. If you have a lot of experience in using Selenium, you can continue using Selenium IDE to record your test scripts.
Check our video guide to learn how to record your first script in EveryStep Web Recorder.