Check for broken links on your website using Postman

If you are using Postman for your API Testing, then you can also you the same to automatically crawl all the pages on our website and check every link for a healthy HTTP status code.

This can be achieved using 2 simple API requests in Postman.

First lets create a new Collection and an Environment in Postman, where you can specify

  • root_url
  • start_url

Specify the values for the root_url and start_url.

root_url as https://linkeshkannavelu.com/

start_url as https://linkeshkannavelu.com/category/software-testing/selenium/

Create a simple request with Get method and enter url as {{start_url}} and in the Tests tab enter the following code.

// set environment variables to default values
postman.setEnvironmentVariable('links', '[]');
postman.setEnvironmentVariable('url', postman.getEnvironmentVariable('start_url'));
postman.setEnvironmentVariable('index', -1);

 

Initialize

Create a second request – Get method and enter URL as {{url}} and in the Tests tab enter the following code.


// Tests and custom scripts can be written in JavaScript.

// get environment variables
var start_url = postman.getEnvironmentVariable('start_url');
var root_url = postman.getEnvironmentVariable('root_url');
var links = JSON.parse(postman.getEnvironmentVariable('links'));
var url = postman.getEnvironmentVariable('url');
var index = parseInt(postman.getEnvironmentVariable('index'));

// increment index counter to access links in array to check
index = index + 1;

// test if link works
if (responseCode.code > 400) {
 console.log("This link is broken: ", url);
 tests["Link works"] = false;
} else {
 tests["Link works"] = true;
}

// if the current url includes the start_url, then this is an internal link and we should crawl it for more links
if (url.includes(start_url)) {

 // load the response body as HTML using cheerio, get the <a> tags
 var $ = cheerio.load(responseBody);

 $('a').each(function (index) {

 var link = $(this).attr('href');

 // add links to the links array if not already in there
 // if you have additional links you would like to exclude, for example, ads, you can add this criteria as well
 if (!links.includes(link)) {
 links.push(link);
 }
 });
}

// if we've gone through all the links, return early
if (links.length - 1 === index) {
 console.log('no more links to check');
 return;
}

// if link is a relative one, prepend with root_url
url = links[index]
if (! /^https?:\/\//.test(url)) {
 url = root_url + url;
}

// update environment variable values
postman.setEnvironmentVariable("links", JSON.stringify(links));
postman.setEnvironmentVariable("url", url);
postman.setEnvironmentVariable("index", index);

// continue calling the same request until all links are checked
postman.setNextRequest('Check URL');

Now Open “Runner” Select the Collection, Select the Environment and Click on Start Run Button.

Run

You can see Postman in action crawling all the links until there are no more links to check.

You can also simply download the Postman Collection and import it into your Postman.

Online Test Conf

SPRING ONLINE TEST CONF: The 100% online conference all about testing is happening on June 13-14, 2017.

This is an initiative to bring all the advantages of attending professional QA related conferences: personal learning, networking etc. without the shortcomings of scheduling, expenses and travel.

Attendance at OnlineTestConf is free and meant for anyone who sees themselves involved in testing and the testing community.

Why an Online Conference?

Not everyone can take time off their work, or pay the costs of physical conferences, and as much as we would like to our employers don’t always want to send us to learn new things and to improve our skills based on the knowledge of our peers.

Today we have the means (technologically and logistically) of organizing an event of this sort and share it with the community.  Something we could not really do even a couple of years ago.

The first conference was held in November 2016, was an amazing success. The feedback from that conference that drove them to make this a recurring event.

This upcoming OnlineTestConference will tackle hot topics such us: Agile team success, IoT, Mobile Testing, Testing AI and more, with a great line up of speakers such as: Alan Page, Paul Grizzaffi, Matt Heusser and Eran Kinsbruner to name a few.

Sign Up for this Conference and Save your seat

State of Testing 2017

 

Recently I have posted the State of Testing Survey 2017 survey conducted by PractiTest and now the survey results are out.

State of Testing survey 2017 has been biggest ever, with the participation from over 1600 professionals from 60 countries! We have 600+ more participants for this survey compared to the last year. This tells us a lot about the value this project is providing to the worldwide QA Community.

Following are some of the key takeaways from this report.

Respondents Demographics:
Indian Software Professionals contributed a lot for this survey. 23% of the participants are from India, and QA Professionals from Europe and Russia contributed to 34%. Most of them have the word “TEST” attached to their professional titles.

Where to Start?
If you or someone you know is starting his/her testing career, it is better to look for work in a smaller company or a startup firm, instead of looking for work in a bigger corporate organization.

Testing salaries around the world:
There is a jump in salaries compared to last year in a number of areas around the world, with the USA, Canada enjoying the largest gains in reported salary. On the other hand India, as a geographical area, showed similar salaries to previous years.

Testers report to a number of departments in the organization:
Again like last year, Its interesting to see that percentage of people from the Testing Function is reporting more to the Project Management and Development Manager than to the VP or Director of Quality.

Testers Approach towards Testing:
Almost all the testers prefers Exploratory / Session based testing than any other testing approaches. People also started trying out Mob Testing as one of the test approach. Mob testing is a group testing activity utilizing one computer and voices out the tacit knowledge in the group of individuals on shared tasks.

Additional Task for Testers:
Mostly we do documentation, managing test environments and requirement gathering. So when looking for tasks that will help you to boost your testing career, try focusing on helping the documentation gets created correctly and also on more technical tasks such as managing environments and taking part of the deployment and integration operations.

Source of Knowledge for Testers to learn:
Mostly QA People prefers Testing Books, Peer Mentoring and Online Communities and forums to keep themselves up-to date.

Skills – More importance to things like Automation, Scripting and Web Technologies and Security Testing. The most important skill is Communication Skill, which is even higher this year than ever before!

To Keep up to date – More people attending more interesting conferences than last year.

Adoption of New Tools: More than half of the testers introduce new tools into their practices.

Automation:
Overall the percentages of respondents using automation remains the same than as last year with 85% of the respondents.

What do Managers look for when hiring a tester?

  1. Problem Solving/Curiosity/Creativity
  2. Ability to think outside the box
  1. Technical knowledge
  1. Understanding of Agile
  1. Communication and listening Skills.
  2. Ability to adopt changes quickly.

 

Job Stability – The stabilization trend we started to see last year is only increasing, and so
people are less concerned in general about their job stability.

Predictions to the Future:
We see that most people want to stay in the testing arena within the next 5 years, although an important number of respondents want to work as Test Managers or Test Consultants.

The report also contains Plenty of good testing gatherings and open answers to Our ideal testing world in the future

To Read the full Report : Download State of Testing 2017 Report

Take part of the 2017 State of Testing Survey

The Largest Worldwide Testing Survey is back!

Following in tradition of the past three years on this QA Intelligence Blog and in collaboration with Tea Time with Testers, we are happy to announce the launch of the 2017 State of Testing Survey!

The survey is open throughout January, 2017 and you can take it right now – 
It only takes 10 min. or less to fill out  (we timed it) but will make a [testing] world of difference.

The State of Testing seeks to identify the existing characteristics, practices and challenges facing the testing community in hopes to shed light and provoke a fruitful discussion towards  improvement.

Last year was very successful with thousands of participants worldwide and the final report was translated into several languages and shared globally.
See the results from last year’s State of Testing Survey 2016.

With your help this year’s survey will be even bigger by reaching as many testers as possible around the world!

ANSWER SURVEY NOW

Other than taking the survey yourself, you are also invited to Share, Tweet, Post, Blog and brag about it with your professional network:

Gear up for State of Testing 2017

Following in tradition of the past three years with the State of Testing survey, conducted in collaboration with TeaTime with Testers, the countdown starts for the State of Testing Survey 2017!

Last year was very successful with over 1,000 participants worldwide, and with your help we hope this year’s survey will be even bigger by reaching as many testers as we can around the world!

The survey seeks to identify the existing characteristics, practices and challenges facing the testing community in hopes to shed light and provoke a fruitful discussion towards  improvement.

The survey will go live during January, 2017. If you’d like to be informed when it is live, join this list:

Notify Me When the Survey is Live

You can also see the results of the last year – State of Testing Report 2016

LinkedIn Free Week of Learning

LinkedIn offers free week of learning from October 24-30. This means all the courses available in LinkedIn are 100% free. You can pick up any course and learn it end to end for free in this one week. It can be anything from a basic Hello World program to Cloud Computing, Mobile Development, AI, Machine Learning, Big Data etc. If you want to become good at your leadership/managerial skills you got those soft skills development courses as well.

As a QA Engineer, this is the right time to go and grab some of the interesting courses.

Here are some of the QA courses for anyone who want to pursue a career in QA.

Foundations Of Programming: Software Quality Assurance – In this course, the author demonstrates the different kinds of software testing (from black box to white box) and how to fit each one into your development cycle. Find out how to test and report issues, and how to use a tracking system to manage the process and the results. How automating some of the testing can make the QA process more efficient and objective.

Insights On Software Quality Engineering – In this course,  the author share his personal insights and cautionary tales and discusses how to get started in QA, how it fits in at companies small and large, and how it has changed since the rise of agile workflows.

Java Essential Training

Up And Running With Java

The above courses covers basics of Java right from Hello World to required OOPS concepts that we will be using in our automation programs.

Using JUnit For Testing In Java – JUnit is an open-source testing tool specialized for Java, and it should be part of every QA Automation Engineer toolbox. Learn how to integrate JUnit with popular tools and IDEs (Eclipse, NetBeans, IntelliJ, and Maven), and conduct a variety of tests, including exception handling and parameterized tests. If you are going to learn Selenium, its good to learn any of the unit testing frameworks like Junit/TestNG.

Mastering Selenium Testing Tools – Here comes the most widely used tool in our test automation. This course is all about demystifying the Selenium suite. Learn to verify web applications, control browsers with code, and scale up the testing environment by distributing the execution of web applications on different browsers running on different operating systems. It starts with the Selenium IDE, and locating techniques like name, id, xPath, or CSS. This also covers Behavior Driver Development along with a complete automation project.

Learning Python Web Penetration Testing – This course starts off by providing an overview of the web application penetration testing process and the tools the professionals use to perform these tests and then interact with web applications using Python, HTTP, and the Requests library. Also it shows how to use the tools against a vulnerable web application created specifically for this course with practical examples.

Following is the learning path, If you want to Become a Leader.

Following is the learning path, f you want Become a Manager.

I just have mentioned very few courses related to QA Career Paths. Still there are plenty of courses available for free. But its free just for a week.

#AlwaysBeLearning

Selenium 3.0 Officially Out Now

Yes. This is one of the major and stable release in the recent times since 2.0 got released around 5 years back.

What’s new we can expect: For users who are using WebDriver API’s this is gonna be just a drop in effortless replacement. But those who are using Selenium Grid may have to go through some minimal configuration changes.

In this version, they have removed the original Selenium Core implementation and replaced it with one backed by WebDriver. For people who are still using Selenium RC should have to undergo some maintenance because of this. This is the right time to migrate the code to WebDriver API’s.

Right from Selenium 3.0, all the major browser vendors are responsible for shipping their own implementation of WebDrivers for their browsers.

Starting with Safari-10, Apple started providing native support for WebDriver API’s. More details here – WebDriver Support in Safari 10

Google already started providing support for WebDriver API’s for Google Chrome using their ChromeDriver.

Even Microsoft when they came up with a new browser “EDGE” for Windows-10, they also came out with support for the WebDriver API’s – Microsoft WebDriver

Mozilla is doing major changes in the internals of Firefox browser to make it more stable and secure. So if you are using Firefox for your testing, you’ll need to use the GeckoDriver, which is an executable similar to the ChromeDriver. But Gecko is still in Alpha and you may have to face lot of issues with your automation w.r.t. Firefox.

The W3C specification for browser automation, based on Open Source WebDriver is still In-Progress and this is gonna reach “recommendation” status.

What you are waiting for? Just go and download the latest from Seleniumhq Downloads