https://github.com/jrh89/selenium-testing
This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.
https://github.com/jrh89/selenium-testing
regression-testing selenium smoke-tests testing testing-tools
Last synced: 4 months ago
JSON representation
This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.
- Host: GitHub
- URL: https://github.com/jrh89/selenium-testing
- Owner: JRH89
- Created: 2024-06-21T22:46:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-31T03:07:06.000Z (10 months ago)
- Last Synced: 2025-01-08T05:54:16.340Z (6 months ago)
- Topics: regression-testing, selenium, smoke-tests, testing, testing-tools
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Selenium Testing
This project provides a suite of Selenium tests for automated browser testing. It includes various tests such as form submission, navigation, and smoke tests. The project is designed to be easily configurable and extendable to meet different testing needs.
## Table of Contents
1. [Installation](#installation)
2. [Usage](#usage)
3. [Configuration](#configuration)## Installation
Follow these steps to install and set up the project:
1. **Clone the repository**: First, you need to clone the repository to your local machine.
```bash
git clone https://github.com/jrh89/selenium-testing.git
```2. **Navigate to the project directory**: Change your current directory to the project directory.
```bash
cd selenium-testing
```3. **Install dependencies**: Install all the necessary dependencies using npm.
```bash
npm install
```## Usage
To run the tests, use the following command:
```bash
npm test
```## Configuration
The project includes a config.js file where you can set various configuration options to customize the tests according to your needs. This file includes URLs, credentials, and other parameters used in the tests.
### Editing the Configuration
To customize the tests, follow these steps:
1. **Open the config.js file**: Locate and open the config.js file in the project directory. This file contains configuration settings for various tests.
2. **Modify the configuration settings**: Update the values in the `config.js` file to suit your testing requirements. Below is an example config.js file with explanations of each field:
```javascript
export const config = {
url: 'http://www.hookerhillstudios.com/Login',
validCredentials: {
email: '[email protected]',
password: 'Testing123!',
},
loginButtonText: 'Login',
expectedUrl: 'https://www.hookerhillstudios.com/',
google: {
url: 'http://www.google.com',
searchQuery: 'Selenium WebDriver',
expectedTitle: 'Selenium WebDriver',
homeTitle: 'Google'
},
formSubmissionTest: {
url: 'http://www.hookerhillstudios.com/Login',
credentials: {
email: '[email protected]',
password: 'Testing123!'
},
loginButtonText: 'Login',
expectedUrl: 'https://www.hookerhillstudios.com/'
},
hackerNewsTest: {
url: 'https://news.ycombinator.com/newest', // Use the 'newest' section URL for the test
expectedNumberOfArticles: 100,
timestampSelector: '.age', // Selector for timestamps
articleSelector: '.athing', // Selector for article containers
articleTitleSelector: '.storylink', // Selector for article titles
}
```3. **Edit the URLs, credentials, and other parameters**: Modify the values in the `config.js` file to suit your testing needs.
4. **Save the config.js file**: After making the necessary changes, save the file.
5. **Run the tests**:
```bash
npm test
```By following these steps, you can customize the Selenium tests to work with different websites, credentials, and other parameters, making the testing framework versatile and adaptable to various use cases.