Selenium Testing
No edit summary
No edit summary
Line 8: Line 8:
The easiest way we recommend is using the Selenium IDE plug-in for your browser, for example Chrome. With the IDE you can create, edit and run a script without any setup on your local development machine.
The easiest way we recommend is using the Selenium IDE plug-in for your browser, for example Chrome. With the IDE you can create, edit and run a script without any setup on your local development machine.


When you have a script that does what you want it to do, as simple and complex as that need to be, you install a Selenium Grid execution environment.
Most of what you run you run from the Selenium command line runner, read[https://www.selenium.dev/selenium-ide/docs/en/introduction/command-line-runner here]
 
====== Here is a quick summary; ======
Install the Selenium command line runner [https://www.selenium.dev/selenium-ide/docs/en/introduction/command-line-runner Command Line Runner]
* The command line runner uses node.js.
** Install the node.js from https://nodejs.org/en/download/ using the windows installer.<br />
* Once node.js is installed, run npm install -g selenium-side-runner
When you have a script that does what you want it to do, as simple and complex as that need to be, you install a Selenium Grid execution environment to run many copies of your test either after each other, or probably more important, in parallel to ensure good overall performance.


Installing a Selenium Grid is surprisingly simple, and we recommend this configuration (there are any number of different ways)
Installing a Selenium Grid is surprisingly simple, and we recommend this configuration (there are any number of different ways)
Line 15: Line 22:
** Make sure that your machine has vCPU turned on in BIOS.
** Make sure that your machine has vCPU turned on in BIOS.
* Install Docker Desktop
* Install Docker Desktop
* Install the Selenium command line runner [https://www.selenium.dev/selenium-ide/docs/en/introduction/command-line-runner Command Line Runner]
**
** The command line runner uses node.js.
*
*** Install the node.js from [https://nodejs.org/en/download/ https://nodejs.org/en/download/ using the Wndows installer]
 


Show the local Selenium grid UI: http://localhost:4444/ui#






Most of what you run you run from the Selenium command line runner, read [https://www.selenium.dev/selenium-ide/docs/en/introduction/command-line-runner here]


==== Useful links ====
==== Useful links ====
Main Selenium site: https://www.selenium.dev/
Main Selenium site: https://www.selenium.dev/

Revision as of 14:30, 1 January 2024

Setting up testing with Selenium

This is not a MDriven specific instruction, it's a page with short instructions and links to other pages to make it easy to know one way to follow to set up testing towards your system.

Selenium does testing of web sites, so it's targeting a TurnKey application. These instruction and testing has all been done on Windows 11.

Selenium is a very widely used framework for running scripted web tests. You can use it both for application testing and for load testing. Load testing though will be for a small number of clients, because it takes a lot of CPU and memory on the test server to run parallel web browsers.

The easiest way we recommend is using the Selenium IDE plug-in for your browser, for example Chrome. With the IDE you can create, edit and run a script without any setup on your local development machine.

Most of what you run you run from the Selenium command line runner, readhere

Here is a quick summary;

Install the Selenium command line runner Command Line Runner

  • The command line runner uses node.js.
  • Once node.js is installed, run npm install -g selenium-side-runner

When you have a script that does what you want it to do, as simple and complex as that need to be, you install a Selenium Grid execution environment to run many copies of your test either after each other, or probably more important, in parallel to ensure good overall performance.

Installing a Selenium Grid is surprisingly simple, and we recommend this configuration (there are any number of different ways)

  • Install WSL2 on Windows (add feature to Windows)
    • Make sure that your machine has vCPU turned on in BIOS.
  • Install Docker Desktop


Show the local Selenium grid UI: http://localhost:4444/ui#



Useful links

Main Selenium site: https://www.selenium.dev/

This page was edited 21 days ago on 04/08/2024. What links here