Found 206 Articles for Dynamic Programming

Advantages of using TestNG with Cucumber

Ashish Anand
Updated on 16-Aug-2023 14:49:34

228 Views

Testing is the process of checking the functionality of an application to ensure it works as per requirements. Unit testing comes into picture at the developer level where adequate measures are taken to test every single entity (class or method) to ensure the final product meets the requirements. What is Cucumber? Cucumber is a testing tool that supports Behaviour Driven Development (BDD) framework. It defines application behaviour using simple English text, defined by a language called Gherkin. Cucumber allows automation functional validation that is easily read and understood. Cucumber was initially implemented in Ruby and then extended to Java framework. ... Read More

Automating Functional Tests with TestNG

Ashish Anand
Updated on 16-Aug-2023 14:48:20

83 Views

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. Selenium Webdriver allows to interact with webpages. It is an interface not a testing framework. To run any test or code only in selenium we must use java main method. TestNG ... Read More

How to Use Beanshell Script in TestNG?

Ashish Anand
Updated on 16-Aug-2023 13:15:53

177 Views

TestNG supports to group the test cases based on similar functionality or uses. Sometimes user has customized conditions to pick classes/methods/groups at run time based on conditions and use cases. TestNG supports simple frequently use scenarios but covering all expects are unnecessary. For Example, user may add multiple groups to single test. While running the group using syntax, TestNG runs all tests those are part of the group. It works as OR statement. Like if a test has 2 groups and only 1 is mentioned in tag it will run the test. But, when user wants ... Read More

How to check reports created by TestNG?

Ashish Anand
Updated on 16-Aug-2023 13:14:20

54 Views

TestNG allows to run the test suites from IntelliJ IDE as well as command line. When user run the testing.xml either from IDE or command line, TestNG generates a default report. It saves all reports and respective html files in Project −>test−output folder. If folder is not present, TestNG creates the folder. Enable the Report Generation While running the testing.xml from IDE, the user has to enable the default reports generation at Add Configuration −> Listeners tab. The following screenshot shows how to enable default report generation in IntelliJ. If the user wants to generate report at customized path ... Read More

How to create a TestNG file in IntelliJ IDE?

Ashish Anand
Updated on 16-Aug-2023 13:09:51

458 Views

TestNG file is a simple java class. IntelliJ supports TestNG class as simple java class. To create a TestNG class, user should create a java class first and then enter the desired TestNG annotations and respective code to execute. In this article, let’s follow the steps to create a TestNG file in IntelliJ. Approach/Algorithm to solve this problem Step 1: Go to the project where TestNG file needs to create. Step 2: Select a folder where to create a TestNG file either in src or test folder. We will create the file in src folder in this article. Step ... Read More

How to continue test execution after assertion failed in TestNG?

Ashish Anand
Updated on 16-Aug-2023 12:50:28

894 Views

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, he wants to continue the execution so all failures can be found out at the time. By default, if a failure occurs in a @Test method, TestNG gets exit from the same @Test method and continue the execution from next @Test method. Here, the use case is to continue the execution of next line even if an assertion failed in same @Test ... Read More

How to continue execution when assertion is failed in TestNG?

Ashish Anand
Updated on 16-Aug-2023 12:46:14

530 Views

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, he wants to continue the execution so all failures can be found out at the time. By default, if a failure occurs in a @Test method, TestNG gets exit from the same @Test method and continue the execution from next @Test method. Here, the use case is to continue the execution of next line even if an assertion failed in same @Test ... Read More

How do I run classes with TestNG by wildcard in testng.xml?

Ashish Anand
Updated on 16-Aug-2023 16:21:24

141 Views

testng.xml has a format as where we define what all test classes should be executed. There is no any specific way to provide regular expression in a class in . But there are work arounds those are useful to run specific @Test from a class. TestNG supports regular expression at include, exclude and package tags. Following are few ways those are handy to use regular expression in a test class run from a test suite. Mention all class names inside . And, inside the class use and . It will exclude all tests starting with name ... Read More

Linked List Allocation

Diksha Patro
Updated on 03-May-2023 17:03:06

5K+ Views

A dynamic memory allocation method used in computer programming is called linked list allocation. In this method, a linked list data structure is used to distribute memory. Memory is divided into a number of blocks of similar size when allocating a linked list. In the linked list, each block is symbolized by a node. A pointer to the following piece of memory is present at each node in the linked list. The final node in the linked list has a null pointer that serves as a marker for the list's conclusion. Linked list data structure and its implementation in memory ... Read More

What are the differences between DTD and XSD?

Bhanu Priya
Updated on 17-Mar-2022 10:56:57

664 Views

Let us understand the concepts of XML Schema Definition (XSD) and Document Type Definition (DTD) before learning the differences between them.XML Schema Definition (XSD)XML is called an Extensible markup language which is used for the representation and manipulation of the data elements. It is a language which is used to communicate the data in the form of structures on the internet.XSD is called as XML scheme definition is the more extended version of the data definition language and is used to explain the structure of the XML schema. The XML features are that it explains the document in a more ... Read More

Advertisements