Codekru

SQL OR operator

In the previous article, we learn how to use AND operator. In this post, we will learn when and how to use SQL OR operator. SQL OR is a logical operator. Like AND, SQL OR operator is used when we need to filter records on more than one condition. But unlike AND operator, a table […]

SQL OR operator Read More »

SQL AND operator

It is often required to filter records in a table using the where clause. If there is a need for filter records using more than one condition and all conditions must be true then we need to use SQL AND operator. SQL AND is a logical operator. It returns true if all conditions will return

SQL AND operator Read More »

How to create testng.xml at runtime or programmatically

In this post, we will create the below testng.xml file at runtime using Java code. Creating a testng.xml file may be necessary in various situations. For example, when running TestNG tests from Jenkins, we can pass specific parameters from Jenkins to our code and then generate a testng.xml file based on the parameters received from Jenkins. Note: We

How to create testng.xml at runtime or programmatically Read More »

expectedExceptionsMessageRegExp attribute of @Test

This post will discuss the expectedExceptionsMessageRegExp attribute of @Test annotation in TestNG. What does this attribute do? According to the documentation – If expectedExceptions was specified, its message must match the regular expression specified in this attribute. So, this means we won’t be able to use this attribute without using expectedExceptions first. Please, read this

expectedExceptionsMessageRegExp attribute of @Test Read More »

@Test annotation attributes – expectedExceptions attribute

In this post, we will discuss the expectedExceptions attribute in TestNG. What does the expectedExceptions attribute do? Sometimes, in our test cases, we need to verify whether certain exceptions have occurred. This attribute will help us achieve that. It would take an array of exception classes and check whether that exception has occurred or not.But,

@Test annotation attributes – expectedExceptions attribute Read More »

SQL ORDER BY keyword

SQL “Order by” statement is used for sorting table records either in the ascending or in the descending order at the time of retrieval. SQL ORDER BY Syntax Above we have specified sorting on column1. Here, ASC is used for sorting in ascending order whereas DESC is used for sorting in descending order. If any

SQL ORDER BY keyword Read More »