Automating react application

Nowadays we all moving towards frameworks like Angular, react Js, Vue JS, etc.

So for Quality teams we have also started looking for options which support scripting language. But before starting any new things a wise approach is to understand the requirement & then look for suitable solution which full-fill it.

Options I considered

  1. Protractor
  2. Jest
  3. Nightwatch JS
  4. Cypress
  5. webdriver JS
  6. selenium
Continue reading “Automating react application”

Agile practice: Test Strategy

Objective 

Before starting any project , we always try to consider working on certain pointers which will help the team in long go. One of them is a QA Strategy & defining the scope of QA in the project.

Scope

What should be the scope of quality related to sprint, release, UAT, etc. If we work on it before hand during initial phases of the project so that we can get maximum benefit out of it.

In Scope

The Framework can focus on the following types of testing:- 

  1.  API Testing
  2.  Functional Testing
  3.  Sanity Testing
  4.  Integration Testing
  5.  Regression Testing
  6.  Database Testing
The Testing scope
  1. Testing all the functionalities to ensure the functional & the business outcome is met
  2. Ensure the approx % of test coverage how much QA can achieve.
  3. Maintain the test cases in Test Management Tool (JIRA) or (TBD) and sharing it continuously with the stakeholders.
Out Scope

Non functional & functional aspects

  1. Performance Testing
  2. Load Testing
  3. Stress Testing
  4. Mobile Testing 
  5. Testing on Tablet devices for OS (I.e IOS & Android)
  6. Accessibility Testing
  7. Testing of disaster recovery and Business Continuity Plan
  8. OS versions which we are not going to support
  9. Browser versions which we are not going to support

To achieve an overall customer satisfaction rating of “Excellent” and to deliver “First Time Right” bug free application.

Quality Objective

Environments

NameDescriptionData SetupTest Usage
DevelopmentThis environment is local and specific to each developer machine. configuration scriptsUnit Test
QAThis environment is local and specific to each tester machine.Through setup scripts.Functional & non functional Integration Tests
UATuser acceptance environmentThrough configuration setup scripts.Regression & Integration tests.
pre productionThis environment support exploratory testingPopulated with obfuscated production dataExploratory testing/ Critical Release Verification 
ProductionLive environmentNew instances will contain standard project reference data. Existing instances will have current data migrated into the environmentProduction verification testing
environment scope

Testing Tools 

List of tools getting used in the Project:-

DescriptionToolSourceVersion
Test ManagementJiraLicensed  Latest
Defect Locking\TrackingJiraLicensedLatest
test management tools
DescriptionAutomation ToolsSourceVersion
GUI Functional TestingSelenium WebDriverOpen-SourceLatest
API Testing Rest AssuredOpen-SourceLatest
automation tools

Test Execution

Where test will execute.

  1. Define steps to build the system
  2. Define steps to execute automated tests
  3. Define those test cases which can not be automated.
  4. Define steps to populate environment with reference data
  5. Define steps to generate test report/code metrics

Defect Management 

Use relevant defect management system wherein we can define the severity/priority of the bugs.

jira- create bug
SeverityDescription
BlockerDefect causes critical loss of business functionality or a complete loss of service has occurred

Critical

Defect causes major impact to business functionality and there is not an interim workaround available.
Minor Defect causes minor impact to business functionality and there is an interim workaround available.
TrivialDefect is cosmetic only and usability is not impacted
Severity

Priority

SeverityDescription
HighShall be taken at most on priority

Medium

Has to be fixed, and can be taken after high priority bugs.
Low Has to be fixed, and can be later from backlog.
Priority

Browser scope

Browser Market Share United States Of AmericaMobile Browser Market Share in United States Of AmericaLatest versionComments/Recommendations
Chrome47.75%54.47%83Supported: Last 2 versions
Safari35.26%38.60%13.1Supported: Last 2 versions
Firefox4.29%0.73%78Supported: Last 2 versions
Edge Legacy3.07%083Supported: Last 2 versions/Minimal usage?
IE2.91%011Supported: Last 2 versions/Minimal usage?
Samsung Internet2.29%4.96%As per the usage can ignore/keep for on demand basis
Opera00.36%69As per the usage can ignore/keep for on demand basis
Android00.27%As per the usage can ignore/keep for on demand basis
browser matrix

Operating System scope

Paid tool (If any)

Define any paid tool is required for

  1. Accessibility testing
  2. Cross browser testing – like Sauce labs, browserstack
  3. Continuous testing – AWS , Microsoft Azure, etc

Generating allure reports in webdriverio

Webdriver provides lot of reports which we can add as a part of the automation suite. You can find details in the webdriverio documentation here

Depending on your requirement you can look for the options. The product on which I am working on, is a customer facing application, so we wanted to consider variant matrix covered as a part of browsers, Operating system, versions of them. Also for the stakeholders to show how the tests are running & moreover the coverage, we have to integrate the reports in our post scripts.

Let’s understand to generate & serve the reports what shall we need to do.

Continue reading “Generating allure reports in webdriverio”

Setting environment variables in AWS amplify

Use case

  • There are certain variables which we need to set while building our application like Integration of test Runner services like Sauce Labs, Browserstack, etcFor this you need to fetch the user name & key from the build tool itself.
  • Also , there could be a chance where you need to run automation at one environment & don’t need to run the whole regression suite on it.

And many more.. As we set them for any Operating system like Windows, Mac, its always good to have them in delivery process as well. Just to make sure we are keeping things flexible

In such cases, you need to set environmental variables.

Continue reading “Setting environment variables in AWS amplify”

Integrating git with AWS amplify

In my recent assignment, we as a team finalised AWS amplify to use as a scalable devops tool.

It took a lot for us a team to get ourself familiar with AWS Amplify, but as the world is evolving we tried our best to put the best of the tools we can add in our project.

Continue reading “Integrating git with AWS amplify”

Cucumber Scenario set up in a typescript-driven protractor framework.

In this blog, I will describe how I have mapped the feature file to step definition and then to page objects in a protractor driven cucumber project.

In this blog, I will describe how I have mapped the feature file to step definition and then to page objects in a protractor driven cucumber project.

Background:

The project is based on

Continue reading “Cucumber Scenario set up in a typescript-driven protractor framework.”

Effective Delivery Teams in Agile practice

For an organization to make sure the business is running, as usual, it directly depends on how the employees understand the business. Now the question is, do we as really want them to understand how we run business and what shall happen if we dint meet the EBITA for that matter.Safeguarding the health of each of the delivery teams is a continuous responsibility. It requires teams that are continuously improving on the ever-changing mechanics of the product -employment-client lifecycle.

For an organization to make sure the business is running, as usual, it directly depends on how the employees understand the business. Now the question is, do we as really want them to understand how we run business and what shall happen if we dint meet the EBITA for that matter.

Or in other words, how important for the employees of an organization is to understand what core believes it holds?

Safeguarding the health of each of the delivery teams is a continuous responsibility. It requires teams that are continuously improving on the ever-changing mechanics of the product -employment-client lifecycle.

Continue reading “Effective Delivery Teams in Agile practice”

Was unable to find a step for “”: Mapping stepDefinitions to feature file in cucumber

Was unable to find step for “Given open application as admin user”cucumberautocomplete

While working with cucumber, when steps are not mapped completely with the feature files, it usually gives this as a warning.

In this blog, I will share how can we map the step definition with the feature files.

How does the feature look like?

unimplemented_methods
unimplemented_methods

But I already have a step defined for this, then why this error is coming?

Continue reading “Was unable to find a step for “”: Mapping stepDefinitions to feature file in cucumber”

Revamping automation framework with Product Mindset logic’s.

Often we really don’t care to look at the material which we don’t understand or which is not eye-catchy. In this space, I will try to share a real-time example of how we as a team understood and deliver a problem that our Product owners and stakeholders were facing at the client-side. And thus helped us as a team in better collaboration over the certain things which we were doing in chunks.
Alright to start with..how about this, can you read this? Very few people can connect to this…right?

Not easy to understand

And now this? More people can understand.

A Simpler way to understand a complex code.

Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4723 [/127.0.0.1] failed: Connection refused

Error Stack Trace

Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4723 [/127.0.0.1] failed: Connection refused: connect
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
Continue reading “Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:4723 [/127.0.0.1] failed: Connection refused”

FAILED: test org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {“code”:-32603,”message”:”Cannot navigate to invalid URL”}

FAILED: test
org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"}
(Session info: chrome=49.0.2623.105)
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 180 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'HSNMM-KhyatiS', ip: '10.50.33.63', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'
Session ID: 805809dc0b6156ce969fb10e0e95c2a5
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=49.0.2623.105, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, hasTouchScreen=true, applicationCacheEnabled=false, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)

Continue reading “FAILED: test org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {“code”:-32603,”message”:”Cannot navigate to invalid URL”}”

JavaScript elements handling in selenium

As we see most of the applications are moving towards development with Angular, React, Aurelia, JS, TS bases scripting language and framework which uses these scripting languages.

When it comes to Quality assurance there is still some project which has not adopted a new framework based on these scripting languages.

For those, we have to interact with the JavaScript element multiple times just to make a tweak in the code. As DOM is very responsive and GUI is fragile we need to make those adjustments in the code. Here are some ways via which we can carry out that in a project which uses Selenium and Java together.

Continue reading “JavaScript elements handling in selenium”

Implementing page object model using protractor and typescript

Before we dwell on some facts let us step back and understand why I am actually writing this blog. As we understand with this rapid growth not only the developers but we Automation Test Engineers are also constantly grooming ourselves by learning new stuff.

Be it a new programming language or a scripting language we have to widen our thoughts. So while thinking of creating a new automation framework now we are discussing things like handling promises, synchronization, infrastructures, continuous testing, continuous integration, version control, etc

In one of the recent projects, I have created a framework in which we picked a new tech stack in contrast to the one which is widely used (Yes, I am talking about Java+ Eclipse + TestNg.)

Let’s go deep dive and understand what all I have done for automating an application for which Frontend is written in Aurelia and Backend in C#

Continue reading “Implementing page object model using protractor and typescript”

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

protractor- session not created: Chrome version must be between 70 and 73


DevTools listening on ws://127.0.0.1:57284/devtools/browser/f4efc932-01f3-4ac5-8a77-b19e65f2849b
 [14:36:42] E/launcher - session not created: Chrome version must be between 70 and 73
   (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17134 x86_64)
 [14:36:42] E/launcher - SessionNotCreatedError: session not created: Chrome version must be between 70 and 73
   (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17134 x86_64)
     at Object.checkLegacyResponse (C:\Users\khyati.sehgal\source\Workspaces\QA\SAND-DEV-1\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
     at parseHttpResponse (C:\Users\khyati.sehgal\source\Workspaces\QA\SAND-DEV-1\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
     at doSend.then.response (C:\Users\khyati.sehgal\source\Workspaces\QA\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
     at 
Continue reading “protractor- session not created: Chrome version must be between 70 and 73”