Hey everyone,
It's a basic project for WEB Testing using Protractor for AngularJS e Non-AngularJS Application with Cucumber.
Let's automate!
First of all, you have to download/clone this project.
Do you have node/npm installed on your PC? if not, you can download in this link: https://nodejs.org/en/download/
- git clone https://github.com/nathsilv/protractor-web-testing.git
- npm install
Now you have this project on your PC and all dependencies you need installed.
Let's understand each file!
This file is our living documentation. It is all test scenarios that will be executed.
it is in natural language for better understand (It is great for stakeholders).
This file contains the page object that will be use, it's the model!
You can put all page objects in this folder: pages
Here, we have all tests! In this project i am testing the LinkedIn website, specifically login feature!
In this file we have all config that we will need for our test. This file has configs about browser, params, reporter, and execution. You can put in this file all config that you thing it is necessary.
In this file we have our signature and dependencies that project will need!
Once that you have all dependencies in this file you just need to execute: 'npm install' to install them.
This way is practice for exporting your project and you don't have a hard word for installing each dependency manually.
Now you can run the tests, you just need execute:
- protractor config.js
You can change params values of the config file in the moment that you execute the tests, like:
- protractor config.js --params.[your_param].[your_field]=[value]
For exemple in configs file:
params: {
valid_linkedin_account: {
'username': 'valid_user@gmail.com',
'password': 'valid_pass'
}
You can change that, like:
- protractor config.js --params.valid_linkedin_account.username=new_username
Then, all tests will run with new params that you changed!