Protractor is an end-2-end testing framework for Angular Applications.
- Keeping all the locators in page object model.
- Test Data is fetching from JSON File.
- Used
allure-jasmin
to generate test report. - Followed modular structure to keep page objects, tests and test data
Note : If you are using WINDOWS
, Please use Git Bash
. Navigate to your directory and Righ Click -> Git Bash Here
- You should install Node JS in your machine. Download it from here
- Use
npm
to install Protractor globally with:npm install -g protractor
. Try runningprotractor --version
to make sure it's working. - Install webdriver-manager by running this command
webdriver-manager update
. It is a helper tool to easily get an instance of a Selenium Server running. - Now start up a server with:
webdriver-manager start
-
Clone this repository to get a copy of this repository in your local machine,
git clone https://github.com/jithinkmatthew/protractor-code.git
-
Change the directory
cd protractor-code
-
Install all the project dependencies by running,
npm install
This will create a
node_modules
folder inside your project -
Make sure that selenium server is running(
webdriver-manager
)
-
Open command prompt in
VSCODE
or any otherIDE
. Make sure that you navigate to the same project directory. -
Two test suites are available.
suite1
: Containspositive
scenarios,suite2
: Containsnegative
scenarios. -
To
RUN
tests, Usestart-test.sh
file.suite1
can execute by runningsh start-test.sh suite1
.suite2
can execute by runningsh start-test.sh suite2
. -
After completing test execution, go to project repository open test report. (
allure-report/index.html
folder). Try to open the report in FirFox Browser.