Monday, June 19, 2023

Protractor Installation Guide: A Step-by-Step Tutorial

Introduction:

Protractor is a popular end-to-end testing framework for Angular and AngularJS applications. To get started with Protractor, you need to ensure that your environment is properly set up. In this installation guide, we will walk you through the necessary steps to install Protractor and its dependencies.

Step 1: Installing Node.js and NPM

  1.     Visit the official Node.js website at https://nodejs.org/en/download/releases/.
  2.     Download the Node.js version 10.21.0 for your operating system (e.g., node-v10.21.0-x64.msi).
  3.     Install Node.js by running the downloaded installer.
  4.     Verify the installation by opening a command prompt and running the following commands:
    • node -v (The version should be 10.21.0.)
    • npm -v (The version should be 6.14.4.)

Step 2: Cleaning NPM and Preparing the Environment

  1.     Open a command prompt and navigate to your project repository.
  2.     Run the command npm clean-install to clean and install the project dependencies.
  3.     Open the Run dialog (Win+R) and enter %appdata%.
  4.     Navigate to the NPM folder; you should find some files available:

    •     jasmine
    •     protractor
    •     protractor-jasmine2-html-reporter
    •     typescript

If the above folders are not created, install protractor-jasmine2-html-reporter globally by running the command npm install -g protractor-jasmine2-html-reporter.

Step 3: Installing Protractor, Jasmine, and WebDriver Manager

  1. Install Protractor globally by running the command npm install -g protractor.
  2. Install Jasmine globally by running the command npm install -g jasmine.
  3. Install the WebDriver Manager (manager chrome version) by running the command npm install -g webdriver-manager.
  4. Additionally, install TypeScript globally by running the command npm install -g typescript.

Step 4: Updating Environment Variables

  1. Open the Environment Variables settings on your system.
  2. In the User Variables section, locate the Path variable and edit it.
  3. Add C:\Program Files\nodejs\ to the Path variable value and save the changes.

Step 5: Updating WebDriver Manager and ChromeDriver

  1. If you encounter any errors related to the WebDriver Manager, update it by running the command webdriver-manager update.
  2. Download the ChromeDriver from the official website of the Chrome browser.
  3. Unzip the downloaded file and store it in a convenient location.
  4. Open the protractor.conf.js file in your project and add the following line: _config.chromeDriver = 'C:/UI Automation/Chrome_Driver/chromedriver.exe'; (Replace the path with the actual location where you stored the ChromeDriver executable.)

Conclusion: Congratulations! You have successfully installed Protractor and its dependencies. You can now proceed to write and execute end-to-end tests for your Angular or AngularJS applications using Protractor. Remember to keep your dependencies updated and refer to the official documentation for any further assistance. Happy testing! 

Learn how to install the Selenium set-up.

Friday, March 17, 2023

Exploratory testing, overview of exploratory testing, its benefits, and best practices for conducting exploratory tests

 Exploratory testing is an approach to software testing that emphasizes the tester's creativity, skill, and experience. It is a type of testing that involves simultaneous learning, test design, and test execution. In other words, instead of relying solely on pre-determined test cases, exploratory testing encourages testers to explore the software, identify potential issues, and test them on-the-fly.

Some benefits of exploratory testing include:

  • Finding defects that might have been missed by scripted testing.
  • Discovering new use cases or scenarios that were not previously considered.
  • Allowing testers to apply their experience and intuition to identify and investigate issues that are difficult to predict.
  • Encouraging collaboration between testers, developers, and other stakeholders.
  • Promoting continuous improvement of the testing process.

Some best practices for conducting exploratory tests include:

  • Start with a clear understanding of the testing goals and objectives.
  • Use heuristics or guidelines to guide testing activities.
  • Perform tests in a systematic and organized manner.
  • Record findings and observations to facilitate analysis and reporting.
  • Collaborate with other testers and stakeholders to share insights and perspectives.
  • Continuously review and refine the testing approach based on results and feedback.

Overall, exploratory testing is a valuable approach to software testing that complements other testing methods. It can help identify defects, improve the testing process, and provide valuable insights into the quality of the software being tested.

Tips for effective quality control practices

 Define clear quality standards: Establish clear quality standards and communicate them to the development team. This can include performance expectations, user experience, and other factors that affect software quality.

Use automated testing tools: Leverage automated testing tools to increase efficiency and reduce errors. This can include tools for functional testing, performance testing, and regression testing.

Conduct frequent code reviews: Regular code reviews help identify issues early in the development process. This can help reduce the number of defects that are introduced into the codebase.

Use test case management tools: Use a test case management tool to manage and track test cases. This can help ensure that all test cases are executed and that results are tracked and reported accurately.

Perform exploratory testing: In addition to scripted testing, incorporate exploratory testing to identify issues that may not be caught by traditional test cases. This can help identify usability issues and other defects that may impact user experience.

Use performance monitoring tools: Use performance monitoring tools to identify performance issues in real-time. This can help reduce the impact of performance issues on end-users.

Develop a strong feedback loop: Establish a strong feedback loop between the development and testing teams. This can help identify issues early and ensure that all issues are addressed in a timely manner.

By implementing these tips, software testers can help ensure that software is of high quality and meets the needs of end-users.

Sunday, August 14, 2022

Environment setup FOR JAVA Automation Testing

Before starting the JAVA basic for automation testing, we need to do first Environment setup for automation testing as below:

  •     JDK (java development kit)
  •     Eclipse IDE
  •     Maven (build/dependency management tool)

follow the instructions as per the environment set up for Java/JDK, Eclipse IDE and Maven

Tools, Versions & URLs:

Java SE Development Kit 8u291

https://www.oracle.com/uk/java/technologies/javase/javase-jdk8-downloads.html 

Eclipse IDE for Java Developers - Version 2020-12 (4.18)

https://www.eclipse.org/downloads/packages/release/2020-12/r 

Apache Maven 3.8.1

https://maven.apache.org/download.cgi

Configure Java:

Environment variable is essentially run third party tool like Maven. 

In order to set the variable, right click on system, go to properties, Advance system settings, Environment variable, New system variable there mention variable name (java_home) and value (jdk path). 

Maven Setup:

Maven is open source tool and developed by Apache. Download the Maven package, extract it. We need to add bin folder with the Maven command and in relation to the path. for that right click on system, go to properties, Advance system settings, Go to environment variable, New variable system, there mention variable name (MVN_Home) and value (apache path) and configure the path. 

Once your Maven setup is done, make sure to close all the open existing command prompt and open the new instance and run the below query in command prompt:

 >mvn -version (provides you the maven and java version version details)

Maven_Project
 >echo %MVN_HOME% (Provides details that it pointing to correct directory)

Eclipse Setup:

Download the eclipse package, extract it and there we are able to see eclipse icon, double click and it will open eclipse.

In Eclipse, in latest version we can see the Maven is inbuild, however if you do not find it then go to google and enter 'maven eclipse plugin' and go to eclipse.org site and there go to download version. Copy the laetst version link and paste it on Eclipse available software pop up screen (include the Maven Integration for Eclipse) and install. In order to check that the Maven installation successful, select New project and there you will see the Maven option.