- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 206 Articles for Dynamic Programming
1K+ Views
We can use the then method in Rest Assured. It is mainly used to validate a Response obtained from a request. Thus, most assertions are included within a then method.SyntaxRestAssured.baseURI = "http://dummy.restapiexample.com"; //GET operation with then methods given() .when().get("/api/v1/employees").then() //verify status code as 404 .assertThat().statusCode(404);ExampleCode Implementationimport org.testng.annotations.Test; import static io.restassured.RestAssured.*; import io.restassured.RestAssured; public class NewTest { @Test void test() { //base URL RestAssured.baseURI = "http://dummy.restapiexample.com"; //input details for GET request given() .when().get("/api/v1/employee/1") ... Read More
2K+ Views
We can create a Cucumber project template using Maven. This can be done by following the below steps −Step1− Click on the File menu in Eclipse. Then select the option New. Next click on Other.Step2− Click on Maven Project from the Maven folder. Then click on Next.Step3− Proceed with the further steps.Step4− Select maven-archetype-quickstart template. Then click on Next.Step5− Add GroupId as Automation, Artifact Id as Cucumber, and proceed.Step6− A project should get created with a Cucumber-type project structure. The Cucumber-related scripts should be written within the src/test/java folder.
671 Views
We need to install the Natural plugin in Eclipse to work with Cucumber. To install it follow the below steps −Step 1 − Click on the Help menu in Eclipse, then select Eclipse MarketplaceStep2 − Enter Natural in the Find field and click on Go. Then click on Install.Step 3 − Proceed with the installation process.Step 4 − After installation is completed, click on the Restart Now button to restart Eclipse again.Step 5 − Again launch Eclipse, then click on the Help menu, then select Eclipse Marketplace. Enter Natural in the Find field and click on Go. Now, the Natural plugin shall be shown as ... Read More
1K+ Views
The testng.xml file has the numerous uses as listed below −Test cases are executed in groups.Test methods can be included or excluded in the execution.The execution of multiple test cases from multiple java class files can be triggered.Comprises names of the folder, class, method.Capable of triggering parallel execution.Test methods belonging to groups can be included or excluded in the execution.ExampleCode implementation of TestNG.xml file ... Read More
1K+ Views
The various annotations available in TestNG are listed below −@Test – This is used before every test method in the java class file.@BeforeSuite – This is used to run a particular test method before all the test methods.@AfterSuite – This is used to run a particular test method after all the test methods.@BeforeClass – This is used to run a particular test method only once before the first test method.@AfterClass – This is used to run a particular test method only once after all the test methods in the present java class file are done with execution.@BeforeTest – This is ... Read More
218 Views
We can perform data parameterization in TestNG. The parameterization in execution in TestNG can be done in the following ways −data parameterization with @Parameters annotation.data parameterization with @DataProvider annotation.ExampleCode Implementation of TestNG xml file with @Parameter annotation. We can pass values at runtime to the test methods by defining in the TestNG xml file.Exampleimport org.testng.annotations.Parameters; import org.testng.annotations.Test; public class TestParameter { ... Read More
774 Views
We can skip a particular test method in TestNG. To overlook a particular test method from execution in TestNG enabled helper attribute is used. This attribute has to be set to false to overlook a test method from execution. Code Implementation of Java class file.@Test(enabled=false) public void verifyRepay(){ System.out.println("Repayment successful"); } @Test public void Login(){ System.out.println("Login is successful "); } @Test public verifyHistory(){ System.out.println ("History verification is successful"); }Here the verifyRepay() method shall be overlooked during execution.
1K+ Views
We can group test cases in Pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest – version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in a wide range of testing API, UI, database, and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of code should be ... Read More
209 Views
The fixtures are methods that shall execute before each test method to which it is associated in pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in a wide range of testing API, UI, database, and so on. The test file of pytest has a naming convention that it starts with test_ or ends ... Read More
5K+ Views
We can exclude a test from execution in Pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in a wide range of testing API, UI, database, and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of code should ... Read More
To Continue Learning Please Login
Login with Google