Agile Testing, Automation, Functional Tests, saucelabs, Scrum, Selenium, smartbear, Testing, Web Testing

Cross browser testing via Sauce labs?

Learning starts when you start experimenting. Be it in Information Technology or layman’s life.

I will be using this space to make you understand a tool which will be of great help, not only for all the Software QA but to the Product Owners, Developer, stakeholders, etc. It has all the solution to the issues we foresee in day-to-day life. As we know in Agile we always define the Acceptance criteria, Definition of Done while make a story.

For those who are not so familiar with Agile , Kindly go through this wiki page- https://en.wikipedia.org/wiki/Agile_software_development.

Continue reading “Cross browser testing via Sauce labs?”

Advertisements
Agile Testing, Automation, Automation Framework, best practises, protractor, Scrum, Selenium, Web Automation, Web Testing

Getting started with the protractor

As an automation QA Engineer,  I always try to work on areas where I can work with pace and efficiency, technology doesn’t matter. As the world is moving towards scripting language We as a QA also work together.

I am talking about the AngularJS, ReactJS applications which are highly acceptable and readily used in today’s world be it a Banking app or a CRM based. One can connect to all the application with frontend as a JS app and backend can be anything C# , Java ,etc. Here the role of QA is to identify the best fit he/she can apply to quickly automate all the cases in a highly compatible language which supports the Frontend application.

Here, I am talking about protractor. For one of my applications which is written in Aurelia (FE tool to create an application similar to AngularJS) we decided to work upon protractor, let’s talk about it in this blog how we managed to do it.

When it comes to testing applications, there are two main types of tests one wants to cover: Unit and E2E . End to end usually refers to the QA testing and unit mainly for the developers to take ownership of.

I will be focussing on the e2e in this post at a glance.

Protractor?

  • End-to-end testing framework for web applications and built on top of WebDriverJS.
  • Uses Jasmine framework for its syntax as default framework.
    Node.js .

Protractor , a wrapper on top of Selenium Webdriver can help us a lot.

Why to use protractor?

  • Support for Angular based Apps
  • Automatic Waiting
  • Page Object Model Support
  • Support for Selenium Server without it
  • The concept of the Custom locator

Who uses protractor?

The whole Scrum team.

Setting up Protractor

  • nodeJs to run protractor commands.
  • JDK – protractor needs Selenium to control browser automatically, which needs Java
    Protractor
  • Webdriver Manager

But, how to execute?

– `npm run e2e`

– run tests via plain Protractor `node_modules/.bin/protractor conf.js`

– run tests `npm test` (runs via flake, which re-runs failed tests)

Adding dependency via package.json

“name”: “e2e”,
“version”: “0.0.1”,
“scripts”: {
“test”: “protractor protractorConf.js –params.login.url=https://localhost:8080”,
“webdriver:update”: “webdriver-manager update”,
“webdriver:start”: “webdriver-manager start”,
“watch”: “npm-watch”
},
“devDependencies”: {
“@types/chai”: “^4.1.7”,
“@types/chai-as-promised”: “^7.1.0”,
“@types/jasminewd2”: “^2.0.6”,
“@types/node”: “^8.0.10”,
“jasmine”: “^3.4.0”,
“jasmine-allure-reporter”: “^1.0.2”,
“jasmine-core”: “2.5.2”,
“jasmine-data-provider”: “2.2.0”,
“jasmine-expect”: “^3.8.4”,
“jasmine-spec-reporter”: “^2.5.0”,
“jasminewd2”: “^2.2.0”,
“protractor”: “^5.4.1”,
“protractor-beautiful-reporter”: “^1.2.7”,
“protractor-testability-plugin”: “^1.2.0”,
“selenium-webdriver”: “3.0.1”,
“ts-node”: “^2.0.0”,
“typescript”: “^2.3.4”,
“webdriver-manager”: “^12.1.1”,
},

Maintaining test data

export class siteUrls {

testurl = “https://test.com”;

}

export class userInfo{

static product_oversight_requirement = [
                        “BCP/DR Review”,
                        “Contract Review”,
                        “Cyber Security Review”,
                    ];
static dropDownSelectYear = [
                        “2018”,
                        “2019”,
                        “2020”,
                        “2021”,
                        “2022”,
                        “2023”,
                        “2024”,
                        “2025”,
                        “2026”,
                        “2027”,
                        “2028”
                    ];

}

Managing configuration

exports.config = {
params: {
login: {
url: ‘localhost:8080’,
}
},
specs: [“./e2e/com.poc.specs/dashboard/User.ts”],
beforeLaunch: () => {
require(“ts-node”).register({
project: “e2e”
});
},
};
Agile Testing, Loggers, Selenium, Selenium Errors, Selenium Webdriver, Uncategorized, Web Automation, Web Testing

Setting loggers in Selenium

Imports to make

import java.io.File;
import java.io.IOException;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;

Continue reading “Setting loggers in Selenium”

Functional Testing, Functional Tests, interview, Manual Testing, Mobile Testing, Selenium, Test Cases, Test Steps, Testing, Web Testing

Functional test cases of shopping cart.

Here are some areas which we can focus on while testing shopping cart:-

SingleProductAddToCart
1. Select any product.
2. Select Add to Cart icon.

1. Verify that the correct PDP page is shown with all the necessary
links and information.
2. Verify that product should be successfully added to cart and in the Cart icon, 1 should be displayed.

Continue reading “Functional test cases of shopping cart.”

Automation, Automation Framework, Selenium, System Testing, Testing, Web Automation, Web Testing

How to take screenshots via Selenium.

If we have to prove something to either a developer or a Product owner then we generally we have several ways via which we can actually show the idea to them, but what if whatever you want to show stop working when you actually want to demo it? This is silly, right? But it happens, You have to believe me!!
Continue reading “How to take screenshots via Selenium.”

Automation, Automation Framework, Browser, Functional Testing, Headless browser, Selenium, System Testing, Testing, Web Automation, Web Testing

How to run Selenium tests in headless mode.

Quick, pace, speed are some synonyms which describes us. We , humans, wants pace in each and every act of ours. We want to speed up things as much as we can do. So we try experimenting things as in we try to search for betterment of work, as we are growing in automating things, replacing human acts to programs or machinery.

If I talk about selenium, then the major time which is spent in framework is at execution. And if I go one step more deeper then the initial point where the execution takes time is when it is trying to open browser be it Chrome, IE or any other. So just to wipe out this pain point there is one such browser which works in headless mode, and is compatible with selenium as well.

Continue reading “How to run Selenium tests in headless mode.”

Agile Testing, Automation, best practises, central repository, collabration, Functional Tests, git, Java, Manual Testing, Maven, Test Cases, Testing, version control, Web Testing

Making code commit in a better way.

Developers always work for their growth and betterment be it a niche technology or any fast technique.
Here in this post I have listed some points which if kept in mind before committing code in central repository(like git) can help an agile team in saving time and achieving improved quality of work.
 better-code

Continue reading “Making code commit in a better way.”

Agile Testing, Automation, Automation Framework, best practises, Java, Java Class, Java Object, Object Oriented, Selenium, Testing, Web Automation, Web Testing

Part 2 – Resolution of some major-frequently-seen Selenium utilities.

This blog is a continuation of my previous blog . Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

Continue reading “Part 2 – Resolution of some major-frequently-seen Selenium utilities.”

Agile Testing, API testing, Automation, Automation Framework, HTTP, HTTP methods, rest assured, Selenium, Selenium grid, Web Automation, Web Services, Web Testing

Part 2-API testing with rest assured.

In continuation with my previous blog, here I will be sharing some basic rest services methods implementation like POST, GET etc.

api

REST in itself without exception has a lot to learn. It has helped the whole team of developers and QA to evolve and mobilise their work as much as possible.

By providing whole lot of the methods like GET, POST, PUT, DELETE, PATCH, etc one can traverse the whole code. Not just fetching, or updating, one can even delete then store and use one data in one and another form. Thus making a complete round of testing and development done.

Like REST java also helped in making this dynamic thing more super, lets see how.

Continue reading “Part 2-API testing with rest assured.”

API testing, Automation, Automation Framework, best practises, HTTP, HTTP methods, Java, java.lang.NullPointerException, rest assured, Services Testing, Testing, TestNG, Web Services, Web Testing

Part 1- API testing with rest assured.

In this post, I will share some basic rest assured code that can be directly used in a project which can support Java, Page Object Model, TestNg, API testing, etc.

rest-assured

Continue reading “Part 1- API testing with rest assured.”

Automation, Automation Framework, Cookies, Functional Testing, Java, Java Basics, Java Class, Java Methods, Java Object, Selenium, Testing, Uncategorized, Web Automation

Part 1 – Resolution of some major-frequently-seen Selenium utilities.

This blog will only focus on areas which coders usually search over web. Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

Continue reading “Part 1 – Resolution of some major-frequently-seen Selenium utilities.”

Automation, Automation Framework, Exception, Java, java.lang.NullPointerException, Object Oriented, Selenium, Testing, Web Automation, Web Testing

at org.openqa.selenium.firefox.internal. NewProfileExtensionConnection.start

There are several phases in a tester’s life starting from working in a team to making automation framework. Along with this he/she has to make sure the integrity of the work-test life-cycle.

Today in this blog post I will share a problem which will come when people who has to work on a framework who was made by someone else and he/she has to maintain and extend it.
Continue reading “at org.openqa.selenium.firefox.internal. NewProfileExtensionConnection.start”

Agile Testing, Automation, Helium, Quality Analyst, Selenium, Testing, Web Automation, Web Testing

Helium .. a boon or not to all automation engineers?

‘Selenium’ is the hot-topic in the automation sector, if any developer or tester knows Selenium well, then it is considered  as he can do anything which is required to perform ‘Web automation’. Its been almost a decade when Selenium came up to the market, and as the time passed it became more and more popular. People started taking it more seriously. Not only as a stand-alone tool, merely with the combination of other tools like Maven, Jenkins, TestNG, etc.

Though the work goes on, and people started taking more interest in this automation area, people started finding flaws in this tool. However some were very genuine, on contrary some seems to make less sense.
Continue reading “Helium .. a boon or not to all automation engineers?”

no main manifest attribute, Quality Analyst, Selenium, Selenium Errors, Selenium grid, Test Cases, Test Steps, Testing, Usability Tests, Web Automation, Web Testing

Resolution of some major Errors/Exception which users face while working with Selenium Grid.

1. failed configuration: @beforemethod setup org.openqa.selenium.webdriverexception: error forwarding the new session empty pool of vm for setup capabilities.

Resolution : https://khyatisehgal.wordpress.com/2014/08/27/failed-configuration-beforemethod-setup-org-openqa-selenium-webdriverexception-error-forwarding-the-new-session-empty-pool-of-vm-for-setup-capabilities/

Continue reading “Resolution of some major Errors/Exception which users face while working with Selenium Grid.”

Automation, Exception, Internet Explorer, Java, Selenium, Selenium Errors, Selenium grid, Testing, Web Automation, Web Testing

Listening on port 32052:Exception in thread “main” org.openqa.selenium.remote. SessionNotFoundException

ERROR

Started InternetExplorerDriver server (32-bit)
2.42.0.0
Listening on port 32052
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.21 seconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '192.168.14.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'

Continue reading “Listening on port 32052:Exception in thread “main” org.openqa.selenium.remote. SessionNotFoundException”