Wednesday, July 22, 2020

What is TestNG? and How to Install TestNG in Eclipse (Java)?

What is TestNG?


  • TestNG is Java Testing Framework that is inspired by JUnit and NUnit.
  • It overcomes the limitation of and drawback of JUnit.TestNG introduce a new set of features that makes TestNG more powerful and user friendly
  • TestNG stands for Test Next Generation.
  • It is used for Simple Unit Testing and Complex Integration Testing.
  • Using of TestNg it makes simple for Functional, Regression and End to End Testing.

Why TestNG is Used?

Selenium tests can not generate proper format for test results but using  TesNg generates the test results. For Example, when Automation Test Engineer works with 1000  Test cases he needs to understand how many test cases fail, passed, skip and he needs to show the reports to his TL.So it's difficult to manually generate reports.TestNG provide the facility to generate reports and Execute multiple test cases in the group.

How to Install Testng in Java (Eclipse)?

Before works with TESTNG, need to require to install Java, Eclipse on the machine if it is already not installed on the machine. To add testing in Eclipse, follow below steps:
1.Open Eclipse.

2. Go to Help->Eclipse Marketplace.

3. Search for "TESTNG" in the search text box and click on "Install" Button to install TestNG.
4.  If it is installed it shows in the above image as installed and for the check, it is installed or not click on Windows->Preferences. In that display Testng when it is installed successfully.

"Eclipse MarketPlace" not display in Help Menu?

Some of the Eclipse not display Help->Eclipse marketplace Menu so for that Follow Below steps:


1. Go to Help > Install New Software


2. Paste the Marketplace Client update site url into the “Work with” field: http://download.eclipse.org/mpc/photon



3. Select the “EPP Marketplace Client” checkbox.

4. Follow the wizard and restart your Eclipse to finish the installation and Check the menu in the Help option.







Monday, June 15, 2020

Basics of Software Testing




Before starting to Manual Testing, We need to know about what is Software testing? Why it is Important? Some basics of software testing.

1. What is Software?

Software is a set of programs or lines of code. Users provide some Input. Using this Input perform some operation by software to get Output.For Eg. Calculator. We provide some input to the calculator. It performs some Operation and gets the Result to the user.

1.1.Difference between Product and Project:

Here Product and Project are also a type of software used but there is some difference in that.
  • Product: Product is an application or software which is developed for multiple Customer. For Example, Facebook, What's app, Microsoft office.
  • Project: Project is an application or software which is developed for specific Customer. For Example, a Bank or school wants an application for their use.

2. What is Software Testing?

Software testing means check completeness and correctness of software (Application) functionality works as per Customer requirement or not. Make sure that Software works smoothly and  End Users can understand and handle it easily.

3. Why Software Testing is Important?

In this rapidly changing market if business want to grow fastly then customer satisfaction is most important. Software testing plays an important role to provide a good quality product to a user.   For Example, If we buy a mobile Phone online then we read a Features and review for that If the product satisfies all requirements and defect-free then we buy it. Software Testing is important the points are as follows:

  • It provides security and privacy to user data.
  • Improves the performance of the software.
  • It makes software User Friendly.
  • It reduces cost and time for a rework on software.
  • It provides confidence to the user to use Applications.

4.Types of Testing:


There are different types of testing done on Software. Software testing divided into main two parts as follows:

4.1.Manual Testing:

Manual Testing is a type of software testing in that tester executes test cases manually by human efforts to check completeness and correctness of Application and manually creates reports.

4.2.Automation Testing:

Automation Testing is a type of software testing in that tester writes a test script an executes through an Automation tool (Program) to check the correctness of application and generates test results automatically by the automation tool.


Episode 2: Adding ionic to a react project

In the last episode, we have seen how to create a react application. in this tutorial, we will see how to add ionic in the existing react application.

Ionic provides a number of UI components that we can use to build our user interface.
for example, ionic provides various UI components like- IonButton, IonIcon, IonContent...
Before we can use any ionic components we will need to add the ionic package to our project.
Check package.json file for which packages are present in the current project.


Step 1. First, install ionic/react package after that you will be able to use ionic components in the project. To install ionic/react, use command as =>  npm install @ionic/react


After successful installation, you can check package.json  where you can find ionic/react


Step 2: Add css file in index.js
core.css is always required in order to use any ionic component
                 import '@ionic/react/css/core.css';



now we are ready to start with ionic UI component.

Step 3: To use ionic button, we need to import IonButton control first from ionic/react package then you can use it the UI section



Now run the project using npm start or yarn start. You will see button as shown in below image



So we are ready with our react + ionic project. You can add other controls.
Now we will do some action on the button.


Here we have added one more ionic component - IonToast. this control is used to show the message on the screen. We have handled the buttons click event. on that, we have updated state of showToastMessage




Happy Coding!!