Showing posts with label automation. Show all posts
Showing posts with label automation. Show all posts

Saturday, November 9, 2019

Postman Tutorial For Automation

Why Automation and Postman?

Automation is the new standard crosswise over sectors. Automation, using postman in testing can improve and increase the depth and also extent of tests for a superior software quality. This blog will help you to understand the automated testing process and run postman in chrome. Also it helps to introduce API automation to your day by day QA processes for executing repeated test cases.

Need for Postman Automation-

Postman Automation is genuinely significant while testing products with an enormous number of integrations as well as successive releases. It is the definitive tool for API automation. The main goal of QA automation is to decrease the consolidated amount of effort required for manually re-testing of a product which is genuinely high. Also, for expulsion of the manual testing efforts that are invested in testing a set of functionalities frequently.
For example, Agile practices like continuous builds, the amount of time taken to receive feedback for a manual regression test with the new code is excessively high. API testing is also known as Integration testing. Integration testing focuses around verifying that the interactions of numerous small components can integrate together without issue. Since API tests bypass the UI, they tend to be quicker and substantially more viable than GUI tests. Hence, a great QA teams will make genuinely precise projections based on the current backlog and also the general information about the project and its architecture and use automation for regression test. So in the event that you are doing it in- house or deciding on product outsourcing, postman automation turns out to be progressively significant as it automates the whole testing process and also saves important time and resources.

Insights into Postman Tutorial for API Automation-

Postman a Chrome application is for interacting with HTTP APIs. Postman allows user to automate test cases in javascript with notable highlights like write test suites, build requests that can contain dynamic parameters, pass data between requests, and so on. For approval of API, on getting a response, Postman validates the response as described in the test contents. This is performed under “Tests” section. Most intriguing part is a JSON response can be parsed into an array and then the elements can be accessed by index and esteem or even be iterated also. The primary advantage of utilizing postman is that user doesn’t have to create a full JSON request programmatically dissimilar to other automation API frameworks to put assert on it. Postman flawlessly design them and helps user directly define test cases.
Tools/Dependency to get started –
1. Postman
2. Node
3. Newman

Introduction to Newman-

Newman is Postman’s collection runner engine that sends API requests, gets the response and also afterward runs your test against the response. It resembles postman’s command line companion. It is extensible. Hence can be integrated into continuous integration servers and build systems.

Benefits of using Newman-

  1. Using Newman it is easy to run a collection of tests using command line
  2. It gives ability to run a collection of tests written in postman right from within most build tools.
  3. It allows to generate and store report directly from command line
    Installing Newman.

Postman tutorial for Newman integration-

Newman is a companion tool for postman that runs Collections from the command line. Newman keeps up feature parity with Postman and enables user to run collections likewise they are executed inside the collection runner in the Postman application.

Variables-

In this Postman tutorial for Automation we are additionally going to cover variables. There are two kinds of variables – global and environment. Global variables are for all collections though the environment variables which are defined for a particular set of collections according to the environment which can be chosen from a drop-down or no environment can be chosen.
When defined variables can be used in request with format encompassed by curly brackets:  {{VARIABLE_NAME}}
The global variables are variables which can we consumed by any collection. So for any data that is accessible for all collections, we define them as global variables. The data defined for a specific environment is called as Environmental variable. We can choose any one environment at a time for a collection or no environment according to choice.
• In Postman, at the top right section, click on (*) icon.
• Now click on MANAGE ENVIRONMENTS (refer the image below)
All the existing environments will be listed under Manage Environments.
• To create an environment, click on Add button at the bottom of the pop-up 
and enter a new Environment.
• To add a global variable, click on the Globals button listed at the bottom of the pop-up.
• For setting a new variable (global and environment), we need to define the New key and Value.

Pre-Request Script-

Next in this Postman Tutorial is Pre- Request Scripts. As the name recommends will run before Tests. Postman allows users to perform specific JavaScript coding to control the data being sent alongside the request. We can write these scripts in Tests section also however it is a decent practice to separate these scripts in pre-request section as it will be executed before Tests scripts. Here we can set Global and Environment Variable dynamically also.
Copy- Paste the below code in Pre- request Script section in Postman :-
postman.setGlobalVariable(“Token”, “MyDemoToken”);
postman.setEnvironmentVariable(“MyKey”, “MyDemoKey”);
postman.getGlobalVariable(“MyDemoKey”);
console.log(“Global Variable = “+postman.getGlobalVariable(“Token”));
console.log(“Environment Variable = “+postman.getEnvironmentVariable(“MyKey”));
  • Select an environment from the dropdown located at the top right section of the screen.
  • Click on “Send”
  • Now go to Global and Environment variable section.
  • Observe that keys have been set dynamically by the script.

To see console output of script use below steps-

1. Type chrome://flags/#debug-packed-apps in the URL bar in your Chrome browser window.
2. Look out for “Debugging for packed apps”.
3. Enable the setting.
4. Click on Relaunch Now once the setting is enabled.
5. Type chrome://inspect/#apps in the URL bar and then click “inspect”
Note :- To get the console output of collection runner, click on the Inspect link of the respective instance from Apps section.

Postman Tutorial for Best Practices of Automation testing-

1. Use trim function if data is retrieved as String from the CSV file.
2. Add your pre- request data in Pre- request Script section.
3. Use chrome dev console for debugging.
4. Always check the length of an array for a test case. It will safeguard the script from failing due to javascript exception
Example :-
if(jsonData.data[0].length>2)
{
tests[“Response should have last name of gob as bluth” ] = jsonData.data[1].last_name === “bluth”;

Advantages of using Postman-

1. If API is updated and test is run in postman, it gives sign of failure. The API would then be updated for right results.
2. Postman can be used for performance testing of API.
3. Postman can be used to perform load testing at scheduled time and record the status
4. As the API’s are automated using postman there is minimum human involvement.

Final Words-

We hope that this Postman Tutorial will be helpful for you. We can conclude that API automation is important task in custom software development. Postman tool caters best to all requirements needed for an efficient API testing process. You can try it to get a stronghold on API’s.
Are you looking for a web development to boost your business? Solace experts are there to help you using new trends. Develop you website with a Solace for more efficiency. Contact us for any web development.

Wednesday, September 25, 2019

How automation enables teams to develop, test and deploy quality applications faster?


Every company owner needs a product that is error free. A product having bugs and errors could not satisfy a single user. Quality of product is the key factor of success of business whether it is small scale or large scale. Automation is a part of our daily life. Not only daily simple repetitive tasks but also highly skilled tasks are slowly getting automated. Automation saves millions of dollars and time in development and deployment of software product because of the benefit of build once and use multiple times. Automation is software development helps the development team to minimize errors and thus increases the productivity. IT automation is the use of instructions to create a repetitive process which replaces IT professional’s manual work. There are some automated tools available for development and testing.

How automation affects processes?

IT automation is depends on software tools to define and execute a series of actions that can be called by manually or by an external trigger. IT automation replaces the series of actions and responses between administrator and IT environment. Complex IT automation can be carried out by combining multiple scripts into a series. These automation processes are more helpful when they replace the administrators frequent task. This saves the time of administrator which is utilized for decision making.
There are some automated tools/frameworks available for development and testing and deployment.

1. Prebuilt Software-

It is difficult to estimate the cost of development of a new project. But it can be easily calculated by using a prebuilt framework such as CMS, pre-built shopping carts. Sometimes there is a risk of increase in cost or delay in deployment due to poor design compatibilities or errors in code. These Pre-built software is built to remove these errors and problems. It provides ready made features that minimizes the cost of development as these features don’t need to be coded again.

2. Validation and Testing Automation-

The testing can be done repetitively so that the bit of software is bug-free.  The testing can be done in parallel with development to reduce the further bugs. No manager would like to deliver untested product.Untested product costs more than tested because it requires more support. Automation of testing helps to not only validate the workflow but also to detect the errors. Automation testing means the automation of mechanism of repetitive and necessary tasks in a testing process that will be difficult to be done manually.  
Advantages of automation testing-
  • Easy and early detection of errors.
  • GUI testing can be achieved at multiple browsers and platforms thus reduces the bugs in less time.
  • Continuous testing and API driven testing detects bugs in multiple releases.
  • Bug free product at each release.
  • Increase productivity
  • Saves money
  • Greater consistency

3. CI/CD for release control-

The concept of continuous integration is to find bugs and issues quickly and provides each developer feedback on their work and rapid fixing of bugs. Build creation is a tool to validate application to make it free from bugs or errors and free from a breakage. This is carried out for each run of build creation.Whenever build fails, the failure reasons are identified and report is sent for bug fixing.

When to automate an application?

  • Large and sensitive projects.
  • Access the application for load and performance with many virtual users
  • Requirements do not change frequently
  • Obtainability of time
  • Projects that need to test the same areas often

Automated testing Tools-

Automation Testing

1. Selenium-

Selenium is popular among all the automated testing tools. It is designed to support functional aspects of web based applications and wide range of platforms and browsers also.
Features of Selenium-
  • It supports many programming languages like Java, Python, C#, Perl, PHP, and JavaScript and even more.
  • Selenium also supports parallel test execution.
  • It requires less resources as compared to other tools.
  • Test cases prepared using selenium can be executed on any OS.

2. Ranorex-

Ranorex is all in one tool for cross- platform test automation. It is easy to use for beginners with codefree click-and-go interface. This is powerful tool with full IDE. It has a large user community.
Features of Ranorex-
  • It automates challenging interfaces like SAP, ERP, Delphi and legacy applications.
  • Run tests in parallel or distribute on a Selenium Grid
  • Cross-browser testing
  • Reduced maintenance

3. Waitr-

It is open- source cross- platform web application testing tool. It is more reliable and also flexible tool of ruby libraries for web browser automation. This testing tool interacts with browser likewise that of human, for eg., click the links, fill the forms and validate text.
Features of Waitr-
  • It is free.
  • Waitr is lightweight and powerful tool.
  • It has an active and also growing community for support.
  • It supports multiple browsers on multiple platforms.

Benefits of automation-

1. Speed-

IT operations includes a number of different tasks. Automation helps to perform these tasks rapidly than manual. Automation helps administrators from time spent on routine tasks, so that they can invest their time on more important tasks such as decision making.

2. Accuracy-

Errors lead admins to invest extra time to troubleshoot and repeat the work process to get it right. IT automation allows an IT professional to build accurate sequence of operations that can be run N number of times in an effective manner.

3. Flexibility-

There will be change in processes as technologies changes. Automated processes remain static until it manually changes. Organizations should have a workflow to update and revalidate automation processes. This helps to track the changes in tasks.
If you are new to software industry know the types of testing at our blog- Alpha, Beta and Gamma Testing- What is the difference?

Automation is a key to success-

Using automation for development, testing and deploying, you will be at a mechanism in which you always know the state of software. It is important to think and note that whether changing in a code causes more errors or not. It can be easily done by automated process and is beneficial to the production. You can safely develop new functionalities without worry about breakage of any functionality. This directly means that you are eliminating the risk of breakage of anything, and if you find any issue, you can fix it.
Need to develop a software for your business? Then you are at the right place. Solace expert’s will help you to develop a software that meets your requirement by using automated tools. So you can get your software within less time and money with high accuracy. Contact us for software development which gives exponential hike to your business that it deserves.

Thursday, April 18, 2019

Does the expansion in automation and digital technology will lay off your jobs?


Okay! Let’s admired the fact that the world has hit the doors of digital transformation and new automation trends. Emerging IT industry and robotics engineering have been serving the world from past few years with its new automation qualities, mobile apps, and system software, and new technological traditions upgrading day by day which is making the life more reliable and convenient to live. It has been observed that digital life through social media platforms has achieved a great hike and will be projected more rapid expansion in coming years; more to this world will completely take its place at the digital industry in future.

But here the question arises that does this rapid growth in digital life and automation firms will lay off your jobs or does the employment sector will lose its importance? The answer is NO! Instead, the fear of rapid growth in technology and automation will not lay off your jobs but it will change the way of employment services and the sense of working in corporate life which will be better than now. Surely it will balance the odds of corporate life in the more convenient way due to prominent technological and automation transformations.

The transformation culture of digital technology and automation will open the possibilities for essential ways of learning, working and communication mediums. The present aspects of social terminology is entirely a part of our daily lives as its mainstream media is involving communication, transport, retail, develop and manufacturing, health care and entertainment with the help of valuable software development, mobile app development, Iot, social networks and much more.

To consider the digital transformation, one has to come up with new business models, business rules, business policies, business analytic, a very own terms and conditions regarding business to step into digital market. In order to this it will affect the entire organization and the shape of today’s world; but accountability of Internet security for each small and large company will be the important factor in digital transformation. And to come up with this Internet of things (IOT) business leaders must be prepared with digital strategies, digital management, digital resources must be available around yourself, clear implementation and business model execution should be in appropriate manner to make the firm foots at digital world.

The expanding list of emerging automation technologies comes up with every new trend to help the society and human lives. Robotics engineering, Artificial intelligence, reality algorithms, machine way communication, 3-D graphics and animation, and hybrid autonomous vehicles which help significantly to transform the business goals and personal lives. The workforce is simultaneously growing with every new trending technology which truly helps for global development and business economics.

So, if we look at the difference between past two decades and current years the technology has created many manufacturing hubs in every desired field of health care, military and security, infrastructures, commercial and economics, and social media which are surely taking the way of employment services to new level of learning in the digital and automation world.