Testing Next Generation – TestNG

 

TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionality that makes it more powerful and easier to use.

It is an open-source automated testing framework where NG of TestNG means Next Generation.  

Why Test NG

These are the major advantages of Test NG

  • Test NG has advanced features which help us to easily maintain our automation scripts.
  • It can achieve Batch execution and Parallel execution
  • It can achieve Group execution
  • It gives the ability to produce HTML Reports of execution  
  • Data Parameterization is possible  

Annotations available in TestNG

  • @BeforeSuit
  • @AfterSuit
  • @BeforeTest
  • @AfterTest  
  • @BeforeClass  
  • @AfterClass
  • @BeforeMethod 
  • @AfterMethod
  • @Test
  • @Parameters
  • @DataProvider

To use TestNG first you have to install Test NG plugin in Eclipse IDE.

Test NG Class: The class which contains at least one @Test annotation is called TestNG class.

The output is:-

This is Before Method
My First Test
This is After Method
This is Before Method
My Second Test
This is After Method
===============================================
Suite
Total tests run: 2, Failures: 0, Skips: 0
===============================================

Batch Execution & Run Script Multiple times  

Batch Execution: Executing multiple scripts or multiple TestNG class is called Batch Execution. For achieving batch execution:-  

  1. We have to generate a TestNG suit file.
  2. Add all the classes in the TestNG classes as shown below.   

For generating TestNG suit simply just Right click on TestNG class and move to TestNG and click on Convert to TestNG. We can also create a suit file for a package which contains all TestNG classes by just right-clicking on the package and following the same.

Run Script Multiple Times: To run a test script multiple times we have to use InvocationCount after @Test annotation.

The output is:-  

This is Before Method
My First Test
This is After Method
This is Before Method
My First Test
This is After Method
This is Before Method
My First Test
This is After Method
This is Before Method
My First Test
This is After Method
This is Before Method
My First Test
This is After Method
This is Before Method
My Second Test
This is After Method
===============================================
Suite
Total tests run: 6, Failures: 0, Skips: 0
===============================================

For changing the order of script execution:

There are different ways to change the order of script execution for TestNG script.

  1. By using ‘priority’ attribute: If we want to change the order of executing script we can use ‘(priority=1)’ after @Test. TestNG by default will execute the scripts and class in Alphabetic order.

The output is:-  

My Third  Test
My Second Test
My First Test
===============================================
Suite
Total tests run: 3, Failures: 0, Skips: 0
===============================================

  1. By Using ‘dependsOnMethods’ attribute: For changing the order of executing script we can also use ‘(dependsOnMethods = { “methodname” })’ after @Test.

The output is:-

My Third  Test
My Second Test
My First Test
===============================================
Suite
Total tests run: 3, Failures: 0, Skips: 0
=================================================

  1. By using TestNG Suit file: For changing the order of executing script we can also use includeTag (<include name=“methodname”></include>) in suit file.

The output is:-

My Third  Test
My Second Test
My First Test
===============================================
Suite
Total tests run: 3, Failures: 0, Skips: 0
===========================================

Parallel Execution:-

We use parallel script execution to test the Script with multiple browsers in order to check compatibility. This is called cross-browser testing. To achieve parallel Script execution, we use parameter tag in test runner in the TestNG Suit file and use one of the annotation @Parameters in TestNG Class.

As a developer, you will find TestNG very useful as it gives the developer the ability to write more flexible and powerful tests with help of easy annotations, grouping, sequencing & parametrizing.

Staff Augmentation – A New Trend in Tech Recruitment

 

What Is Staff Augmentation?

Staff augmentation is characterized as a technique for filling the supposed ‘skill-hole’ that enables organizations to engage in top-level experts for singular ventures without incurring similar expenses of hiring new full-time workers.

IT staff augmentation merchants enable you to add technical resources to your in-house development group on a short or long-haul premise. These resources are utilized straightforwardly by the seller, in this way wiping out the cost and liability of making new full-time hires. That being stated, remote developers are contracted through a staff augmentation firm and are overseen by the customer they work with and are normally devoted to one project at a time.

Why Staff Augmentation?

In case you’re contemplating strategic staffing solutions for your organization, however, don’t have room schedule-wise or cash to procure full-time workers, you should need to consider Staff Augmentation.

Staff Augmentation is the best choice when you’re wanting to reinforce your present IT group for a specific timeframe or when you have to employ developers with a particular range of abilities.

Whatever is your staff Augmentation plan of action, here are a couple of reasons explaining why it can enable your organization to make larger amounts of progress.

Staff enlargement spares time and cash

Consider to what extent it takes you to enlist a full-time worker. From a set of working responsibilities to enlisting to meeting to introduction and preparing, it’s a significant long process. What’s more, once you’ve experienced that whole procedure, you’re not ensured that the individual you enlisted will remain with your association for a long timeframe.

You’ll additionally spare a huge amount of cash on finance and protection benefits when you adopt staff augmentation. It gives you the correct specialized range of abilities according to your requirement.

Maybe there is one part of your answer that requires very specific coding language dialect. For what reason would you contract a full-time representative with a claim to fame that you’ll presumably just utilize one time?

One of the best advantages of staff augmentation is that you can enlist a whole group of developers — each with a new specialty — that is as of now used to cooperating. This can dramatically accelerate your general improvement time and help get your product to market faster.

Staff Augmentation enables you to scale all over as required

There will be times all through the lifecycle of your business that will be extremely occupied and will need extra help. What’s more, obviously, there will be moderate periods also. As opposed to going through an arrangement or enlisting or cutbacks, it’s substantially less demanding to supplement your present group with “fitting and-play” staffing.

Having the capacity to scale your team as required is the way to having the capacity to scale your organization.
Taking everything into account, the staff augmentation can be extraordinarily advantageous for new companies and undertaking associations. While considering team augmentation, try to take a gander at a few respectable staff expansion suppliers. It’s a smart thought to request a couple of the developers’ resumes to get a thought of the kind of tasks they’ve taken a shot at and their subject matters.

Appreciate an Advantage Over Your Rivals

When you have a firm that deciphers your necessities and requirements, you are in good fortune. Presently you can utilize this channel to pick up an edge over your rivals. You don’t need to stress over overhead expenses yet be upbeat about the way that you approach a tremendous store of talent that would take your task a long way in front of your rivals.

With staff augmentation as an option, you will never again need to stress over gathering due dates. On account of the ongoing requests like reducing spending plan, mission-critical projects, forceful deadlines and shortened product cycles you have no choice but rely on staff augmentation.

Staff Augmentation over Project Outsourcing

Project Outsourcing

In Project Outsourcing, your organization procures a team from another firm. They will be with you for the term of the task. The group will be overseen by the outsourcer, with the particular tasks that they have to do in a detailed manner.

The Comparison

1. Results

A Staff Augmentation team is a talented group to work in digression with your inside staff. The aim is to get more skilled resources.

With Project Outsourcing, the thought is to contract outside groups to complete a particular work. You should disclose your necessities to the outsourcer and assume that they will be met completely. The aim is of accomplishing the wanted outcomes.

2. Picking up Control

With Staff Augmentation, you should prepare the new group. They work together with your perpetual staff and take after the organization standards and procedures.

With Project Outsourcing, the group will work outside the workplace, more often than not. They don’t need to go to your office, while coordinated effort with the interior staff will be insignificant or overseen through the outsourcer. The outsourcer will be the connection here. He/she will pass on the rules and audit purposes of the task.

3. Range of Responsibility

At the point when the Staff Augmentation group comes into your office, you should confer a specific level of preparing to them. Along these lines, you can guarantee that they have the right stuff required for the undertaking, so there is positively no trade-off in quality.

In Project Outsourcing, the preparation is altogether done by the outsourcer so the entirety of your instructions is done (to the merchant), and he/she will convey a group who will give you precisely what you require. The secret lies in enlisting the best merchant.

4. Task Scalability

There is every chance the project extension will be expanded as you go along. In Staff Augmentation, task scalability will prompt acquiring more individuals and prepare them. In any case, fortunately, you can use new aptitudes and infuse them with existing ones.

This is more practical and economical in Project Outsourcing on the grounds that you are paying on the volume of work premise as economies of scale apply here. Expanded profitability is nearly ensured.

Why a Business needs Mobile Apps?

 

Mobile Apps or Web Apps?

It can be quite a decision to make for a business that is just starting. While businesses with huge funding to back them can afford to have both mobile and web apps. That’s not the case with new start-ups, they have to have all the valid reasons with them before they pay to have an application developed for their service. They have to think smartly and make a choice according to their cost, usability and the audience they serve.

According to statistics, it’s the era of mobiles because the number of mobile users today is greater than the number of desktop users. And it has been going up for the past decade and there is no way it is coming down in the coming years too.

It’s time for businesses to realize mobiles are the effective way to attract customers. They have to start new operations through mobile websites and mobile apps.
Let’s look at reasons why Businesses should go for Mobile Application Development.

Mobile Apps Offer Personalization

Mobile Application serves users with a personalized content and connects with the users at a personal level. They utilize a cohesive, familiar set of design standards which make them more intuitive to users.

When Mobile apps are compared to web apps it’s clear that Mobile Apps offer a more tailored communication. They offer services based on user’s interest, location, frequent behavior.

This helps a mobile app to engage with users. Mobile apps can let users set up their preferences at the start, based on which users can be served with customized content.

Users Spend More Time on Apps

Smartphone users install applications on their phones for almost every service, spending 86% of their time on mobile apps. That leaves just 14% of users time for web apps. Bowsers are not the most favorite things for users to use on their phones.

Capturing the user’s attention through Mobile Apps will prove to be more successful for businesses.

Mobile applications are unimaginably simple to distribute, there is no problem involved with application stores. All the backend for downloading and facilitating the item is dealt with. In return for all of this, application stores take a weighty 30% of all revenue driven through them, yet the advantages of having such a steady establishment are completely justified regardless of the cost.

Getting an item under the control of a client has never been less demanding, and the potential market for Mobile applications is colossal. Google guaranteed they’d achieved 1 billion dynamic Android clients a year ago, and however Apple hasn’t discharged end product numbers, we know they sold around 170 million iPhones a year ago alone.
Tight these numbers down to your particular specialty and the pool of potential clients is as yet colossal.

Build Brand and Recognition

A mobile application for your business can enormously add to your Brand image and Brand loyalty. An application is something that stays on the client’s gadget for some time.

This implies the application is possibly unmistakable to the client whenever they use their mobiles and individual use cell phones at a considerable measure.

The mobiles are increasingly turning into the prime interactive gadget for customers. We as of now utilize our mobiles more than we sit in front of the TV. Despite the fact that PCs still lead the race in the corporate world it’s important that mobiles are considerably more flexible in the way it can be utilized, which makes it significantly more accessible.
Today every business talk about developing the mobile app. On the off chance that you have a business though, you require an application to enhance your example of overcoming adversity. Starting a business today is better with a Mobile application.

A mobile app acts like a billboard sign for your business. You can do what you need with it; you can make it trendy, hip, useful, stunning. Be that as it may, what you truly need to do is make an application that has highlights your clients will love while being well designed and flawlessly outlined.
The more frequently you can get clients involved with your application, the sooner they will be slanted to purchase your item and will get the benefit. In publicizing, this is known as the “compelling recurrence”: as a general guideline, hearing as well as observing your image roughly 20 times is the thing that will get you genuinely notice.

Apps Can Work Faster Than Websites

A very much composed Mobile application can perform activities significantly faster than a web app. Applications more often store information locally on mobiles. Consequently, information recovery happens quickly in Mobile Application.

Applications can additionally spare clients’ time by putting their preferences and utilizing them to take proactive decisions for the clients’ sake.

Mobile applications have the benefit of touch interfaces, which tends to make them simpler and more agreeable for clients. This is particularly evident when you utilize them on the move.

4 techniques to make exceptional User Experience

It just takes a few seconds for a customer to decide whether the site is worth their time or not. Those few seconds are your only chance to reel a potential customer in.

Now, what can be done to attract the user in such a short span of time?

The answer is a great User Experience.

User experience aka UX is considered to be the manner by which a man interacts with a digital product. The emotions or a connection a user experiences while using any service or product. It can prove to be a differentiator in a crowded marketplace or can be a selling point for B2B digital services.

Though, at the core, UX is about contemplating the user preference. Various elements like usability, accessibility, execution, design etc, all come under the umbrella of UX, usability being the key component.

Various industries like Finance, Healthcare, Education, e-commerce are creating user experiences keeping in mind the needs of the users, focusing on making the product more desirable.

It is essential that the users have the same feeling about them regardless of the device. To create a more universal, and effective, user experience.

Let’s take a look at what good UX Design asks for and avoid confusing surprises.

Letting simplicity rule

All roads lead to a simplistic and human-centric approach of design, where the site has to be well-organized keeping the user in the prime focus.

For an example say retail sites can be fairly complex. The main aim of these sites should be to enhance the usability of the web space which will motivate the user to take the next step towards the desired action.

Amazon has perfectly achieved this by using the same UX for years now, letting the simplicity rule.

We can take inspiration from Paypal as well. After receiving feedbacks stating their site was too complex, it was upgraded in 2014. John Maeda’s Laws of Simplicity was are at play here: reducing, organizing, adding meaning, positioning.

Tearing down roadblocks

Fluidity is an essential component of a great User Experience. It helps the user in easily navigating through the site. Various roadblocks which occur may not create a rich human interaction experience and will result in a sloppy site which may not drive users back.
Roadblocks can be vaporized by developing a design which makes the user reach their goal faster and smoothly. Each extra step adds friction which can cause users to drop out of the process.

Humanizing technology

Humanizing technology is a huge part of the user experience. Developing content which creates an emotional bond with the user is making the website move beyond usable and useful. The users can be delighted by using elements of humour. One of the most promising new element that can make interfaces easier and more fulfilling is Chat-bots. By starting a conversation on the site can result in achieving a human touch.

Adding Clarity and Digestibility

Great designs are anything but difficult to process. A simple website will make sure the user is not using a ton of energy to make sense of what he/she is looking at. Going beyond an easy-to-read copy using different sizes, colours, icons can highlight and allows someone to find what they are looking for a lot faster.
Rather than hitting a brand-new user with a whole stack of instructions, a digestible design will have a simplified outline.

Android Studio TIPS for Devs.

If you have decided to bounce into Android advancement or have been filling in as an Android developer for some time now, you have reached the ideal place.There is no alternate route or a simple method to become a successful developer. However, if you will invest the exertion and heart required, you will unquestionably get all that you deserve.
On your mission of becoming an Android developer and for increasing your chances of success as an Android developer we have prepared a few tips. There are some paramount things one should always take care of if you aspire to achieve great skills.

1. Change Android Logcat colors.
To change Android Studio Logcat you need to go to: Preferences (Settings on Windows / Linux machines) → Editor → Colors & Fonts → Android Logcat and change the foreground color for every type of log.

2. Use split screen for increasing efficiency.
To open split screen :Right Click on tab you wanted to split → Vertical / Horizontal Split →and that’s it.

3. Enable multi cursor feature
To Enable multi Cursor :Press (alt + j for windows) or (ctrl + g for mac) →select the word with multiple occurance you want to rename and start typing .

4. Move hardcoded strings to resources
Step : 1 Press option + return (Windows / Linux: alt + enter).

Step : 2  Enter name of string in Resource Name hit OK...and you are done.

5. Format Your Code
 Quickly Hit cmd + option + l (Windows / Linux: ctrl + alt + l) to format your code , it works like a charm for messed up programmers, gives proper indentation, and spaces wherever needed.

Before Formatting

After Formatting

6. Quickly close a tab
While holding Shift key and click on the opened tabs to close them to quickly close the unusable tab.

Conclusion
Making progress as another Android App designer isn’t simple, yet isn’t inconceivable either. What’s more, with all the true stories of overcoming adversity that are out there, what influences you to surmise that you can’t be one of them.
Last but not the least- Think Big. As Palomar stated: “You need to think your app will be downloaded by millions users” Except if you target a small group and you know about what that implies for your business, you should plan for an impressive future and have faith in progress.

Happy Coding

 

 

How to integrate Maven Project from Bitbucket to Continuous Integration Jenkins

First, let’s understand what Continuous integration is. It’s a process which allows you to identify errors in the starting. All development work is integrated as early as possible and artifacts are created and tested automatically.

Now, what is Bitbucket?

Bitbucket is the most commonly used tool for version control system, the whole team can add and commit the test scripts that are developed locally and push the changes to the bit.

How is Jenkins used?

Jenkins is a widely used open source tool to perform continuous integration and build automation. It monitors the execution of the steps and allows to stop the process if one of the steps fails.

Jenkins can pull the source code from Bitbucket server by selecting the option of source code management and specify the SSH key and can find the source code of your project.

Now we will take you through the process step by step.

  1. To setup Jenkins, first of all, you have to download Jenkins.war file from the link- https://jenkins.io and copy that file to your c drive.
  2. Open a command prompt and execute —
    1. java –jar c:/ jenkins.war
  3. When the installation is complete the browser will be launched. If it doesn’t, open a browser- To browse http://localhost:8080
  4. To unlock Jenkins page, paste this password into the Administrator password field and click Continue.
  5. When Jenkins is up and running you can click on Manage Jenkins.
  6. After that click on Manage Plugins.
  7. Move to Available tab
  8. Search for Maven Integration plugin and Bit Integration by clicking on the checkbox.
    Maven Integration plugin will allow you to add a maven project and Bit Integration plugin will allow you to pull source code from the repository.
  9. Then click install without start and wait for the installation, then click on restart.
  10. Comeback to Manage Jenkins page.
  11. Click on Global Tool Configuration.
  12. Click on JDK Installations.
  13. Now add the JDK path.
  14. Click on Add Git and add the Git path.
  15. Click on Maven installations and add the Maven path.
  16. Click on save. The configuration is done. Now you just need to create a Maven project.
  17. To create a new Project, you have to Move to Jenkins dashboard and click on Create New Job.
  18. Just provide any Name for Project and select Maven Project for creating a maven project and then click on Ok.
  19. Select Git in Source Code Management and enter your repository clone SSH/HTTPS URL and add a valid username and password in credentials.
  20. Scroll Down to Build under this in Goal and Options. Enter clean install or as you need.
  21. Click on Save.
  22. Now you can click on Build and whenever you click on build, Jenkins will pull the latest commit source code from Bitbucket and generating a build. Also, it will generate a test report of that execution.Hope you got some insight on how to  integrate Maven Project from Bitbucket to Continues integration Jenkins and found our tips useful. Suggestions are always welcome and appreciated.