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”

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”

Agile Testing, Automation, central repository, collabration, git, Maven, version control

Basic commands to start working with git.

In one of my previous blog, I have shared my experience why we need to use ‘Git’. In this post I will share basic commands to start with.

So lets get started.

To start with you need a machine where you want to use git. The choice would be of Windows, iOs, Linux, etc. The links would be same for different operating system, you just need to choose the one best fits your computer system.

Continue reading “Basic commands to start working with git.”

Automation, Automation Framework, Design patterns, Java, Maven, Safari, Selenium

Running selenium scripts on browser Safari and Mac Operating System

Safari Logs

SafariDriver Launcher
 [ 0.007s] [safaridriver.client] Connecting to SafariDriver browser extension...
 [ 0.019s] [safaridriver.client] This will fail if you have not installed the latest SafariDriver extension from
 http://selenium-release.storage.googleapis.com/index.html
 [ 0.020s] [safaridriver.client] Extension logs may be viewed by clicking the Selenium [✓] button on the Safari toolbar
 [ 0.071s] [safaridriver.client] Connected to extension
 [ 0.072s] [safaridriver.client] Requesting extension connect to client at ws://localhost:10975

Continue reading “Running selenium scripts on browser Safari and Mac Operating System”

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

adb, Agile Testing, android, Automation, Mobile Testing, MTP, PTP

How to start mobile testing in android.

There are multiple approaches you can take to kick start mobile testing. For this you need to understand what you are actually trying to achieve and what constraints you have like how many team members, testing devices, etc.

The first thing you have to have a good environment to start with. There are two ways to do the same one via emulators, and the other on actual devices. Emulators are easily available, free of cost though they are very slow and real results are hard to capture in them. While real devices are fast which lead to real results and are easy to use. 
Continue reading “How to start mobile testing in android.”

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

Automation, Automation Framework, Design Pattern, Design patterns, Page Object Model, Testing, Web Automation

Part II – One step deeper into Page Object Model.

As we have already discussed in my last post on page object model, why we need design patterns while coding. In this post, lets see what all pre-requisites are required to get a quick start so that we can get a better understanding of POM aka Page Object Model:

  1. The functionality classes (PageObjects) represent a reasoned common lineage between the pages of the application.
  2. The Page Object pattern act for the screens of your web app as a sequence of objects.
  3. It encapsulates the characteristics represented by a page.
  4. It permit us to mock-up the UI in our tests.
  5. A page object is an object-oriented class that work as an interface to a page of your AUT.

Continue reading “Part II – One step deeper into Page Object Model.”

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