TestNG allows to run the test suites from IntelliJ IDE as well as command line. Usually, IntelliJ IDE is handy to run testng.xml for development purpose while command line (cmd) for actual execution. There are few pre−requisites to run test suites from IntelliJ IDE: testng.xml file should be created to define test suites and testing classes to execute. All dependent jars should be configured as External Libraries. It includes testing.jar, jcommander.jar and any other jars those are used in test cases. It usually gets done while setting up the project first time. JDK set up at project level, ... Read More
TestNG supports native dependency injection. It allows to declare additional parameters in methods. At the run time, TestNG automatically fill these parameters with right value. Following are few native dependencies in TestNG: ITestContext XmlTest Method ITestResult These dependencies help to retrieve the test execution status. Usually, @AfterMethod supports all these native dependencies and test status could be either Success, failure or Skip. However, TestNG supports following test status those can be retrieved by calling the function at right place. ... Read More
Introduction Most companies and businesses are leveraging and integrating data science and machine learning techniques into their workflow to enhance their sales, marketing, and productivity of the projects and workings on the same. The viral fever, or the TVF, is one of the biggest content creation companies which creates movies, web series, and serials, which is India based company. The TVF uses data science and machine learning techniques to enhance its productivity and user experience. In this article, we will discuss how TVF makes a profit using data science and machine learning, which techniques they might be using, ... Read More
Introduction Data analysis is an approach in the field of data science and machine learning where the dataset is analyzed well in order to get the relationship between dataset features and get an idea about the behavior of the data and its parameters. In data analysis, trial and error play a major role while developing a machine learning model. It has certain advantages that allow data analysts or data scientists to make the model more reliable and predictive according to the dataset available. In this article, we will discuss the role of trial and error in data analysis, ... Read More
Introduction In machine learning, the performance and accuracy of the model completely depend n the data that we are feeding to it, and hence it is the most influential parameter in model training and model building. Mainly while dealing with the supervised machine learning problems, we have mostly categorical and continuous variables in the dataset. There are some benefits of converting categorical variables into continuous variables. In this article, we will discuss some of the benefits of converting categorical variables to continuous variables, how it affects the model's performance, and what is the core idea behind doing so. ... Read More
Logistic regression is a type of classification algorithm used in machine learning very frequently. It is one of the easiest and most efficient classification algorithms, which is tried out on almost every model built for classification problems. However, we can also use logistic regression for solving regression problems, although in such cases, we cannot expect great accuracy and reliability of the model. In this article, we will discuss logistic regression, how we can use it for regression problems, what steps are needed, and the code example for the same. This article will help one to understand the behavior of ... Read More
TestNG is a powerful testing framework, an enhanced version of JUnit which was in use for a long time before TestNG came into existence. NG stands for 'Next Generation'. TestNG framework provides the following features − Annotations help us organize the tests easily. Flexible test configuration. Test cases can be grouped more easily. Parallelization of tests can be achieved using TestNG. Support for data−driven testing. Inbuilt reporting. Java 1.5 or higher version allows to interact with TestNG. To run any test or code only in java we must use java main method. TestNG provides us a framework that ... Read More
TestNG is an open−source automation testing framework. It can be used along with build tool such as maven, Gradle, ant and even with snapshot. However, user can separately download the TestNG jar file and configure it with the project without using build tool. In this tutorial, we will see how to update IntelliJ IDEA testing−plugin to TestNG version 6.8 or latest TestNG jar. Download latest TestNG jar Following steps should be followed to download the latest/specific version of TestNG jar. Open the browser and navigate to https://testng.org. Once page opens, click on Download present at top. The ... Read More
TestNG provides an option of tracing the exception handling of code. User can test whether a code throws a desired exception or not. Here the expectedExceptions parameter is used along with the @Test annotation. This annotation is very useful in negative/exception testing. As per TestNG documentation: “The list of exceptions that a test method is expected to throw. If no exception or a different than one on this list is thrown, this test will be marked a failure.” In this article, we will see how to implement expectedExceptions in TestNG. Approach/Algorithm to solve this problem Step 1: Create MessageUtil.java ... Read More
A TestNG class can have different tests like test1, test2, test3 etc. There could be some failure while running the test suite and user may get failures in between of @Test methods. Once a test method gets failed, it skip remaining code of the @Test method and moves to the next @Test method. However, user may want to skip remaining all @Test methods after getting 1st failure. There are 2 most popular solution for such use cases: Write dependsOnMethods annotation − But this solution works only if user knows exact dependent method/s otherwise in large suite it would be ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP