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”
});
},
};
protractor, reports, Selenium

Reporting in protractor based automation framework

Reporting is one of the major features which completes the framework. This is something which impacts the stakeholder and gives them the real picture as a whole without looking into the nitty-gritty.

I have tried integrating a couple of reports in a protractor based automation framework which I have prepared for an Aurelia based application.  In this post, I will share the one which I finally implemented and works for me.

Continue reading “Reporting in protractor based automation framework”

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”

Automation, Java, Loggers, Quality Analyst, Selenium, Testing, Timestamp

Current timestamps in selenium

timestamo.jpegIn this post I will be sharing a function to get current timestamp in selenium?

I will be sharing a code snippet which will have a function called ‘getCurrentTimeStamp’. The code is entirely in java, hope this will help.

Continue reading “Current timestamps in selenium”

Browser, Chrome, collabration, Headless browser, Safari, Selenium

Dealing with multiple browsers in selenium

As technology grows we have to deal with multiple things. Things which are similar in behaviour and functioning but still different. One of the case comes up when we have to deal with multiple browser in selenium.

Here is the code snippet which can help you to initiate a browser seamlessly when added in project utility.

Continue reading “Dealing with multiple browsers in selenium”

adb, Agile Testing, android, Automation, Functional Testing, Java, Mobile Testing

ADB for mobile quality analysts.

As we (QA) are growing more towards automation, we have now started exploring tools which developers are using for their development. Not just for developing our own testing framework but also for capturing logs, checking code smells, etc we can use adb.

And I think this is very cool and good to start exploring in this direction, as learning is never ending and shall never stop. Mobile testing is very dynamic and in this blog I will share some experience over adb for android testing and debugging.
Continue reading “ADB for mobile quality analysts.”

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.”

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.”

Selenium, Selenium grid, Testing

How to deal with Internet Explorer issues to make it work via Selenium.

To err is human, well said.

I have been traversing over web what all new things I can explore and share knowledge about, but I can never deny the fact that there is a lot which I can share and talk about. Today I will share how Selenium faces problem  while connecting with Internet Explorer. Lets get started then.

How to use Internet Explorer?

Selenium provided support to Firefox, by default. This is something which the Selenium-creators have done to make our life easier while working with FireFox. Now, how about browsers other than default. Of-course, they understand that Web-UI testing can not be said as completed if it is not tested well on multiple browsers.

For testing your application on Internet Explorer via Selenium, you need to add the internetExplorer.exe into your project. And use this for the invocation of the browser,like this:
Continue reading “How to deal with Internet Explorer issues to make it work via Selenium.”

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”

Automation, Selenium, Selenium Errors, Testing

Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect

Today, in this write-up, I am going to share resolution of an issue which is not a frequent one and will not come rapidly, but yeah I have seen this issue while working with Selenium grid, so I am sharing this with you all.
Continue reading “Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect”

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.”