Passing body to POST request:- We know that we need to pass a payload ( JSON or XML) to POST request. REST Assured makes it very handy to pass body to request. We can pass body as a String or a JSON file or a XML file or a Java Object or a byte array. …
Continue reading Write First POST Request In REST AssuredJava Automation
RestAssured is a class which consists many static fields and methods.It supports POST, GET, PUT, DELETE, HEAD, PATCH and OPTIONS requests and to verify the response of these requests. RestAssured has a static overloaded method named get() which returns a reference to the Response interface. In fact return type of all http methods in RestAssured …
Continue reading Write First GET REST Assured TestAdd Maven dependency of REST Assured in pom.xml Add Maven dependency of JSON Schema Validator in pom.xml ( Needed for JSON schema validator) Add Maven dependency of Jackson JSON Java parser ( Needed for mapping Java objects to and from JSON ) Using Eclipse IDE Using IntelliJ
Continue reading Setup a Basic REST Assured Maven ProjectREST-assured is an Open Source Java library which is used to test and validate REST APIs. Dynamic languages like Groovy , Ruby are helpful in API testing which was harder in Java. We have a famous Java library named Apache Http Client which is also used to do API Testing but it requires a lot …
Continue reading Overview about RestAssuredA class that represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value. There exist different variants of these global identifiers.
Continue reading UUID class in javaScanner is a class in java.util package used for obtaining the input of the primitive types like int, double, etc. and strings. It is the easiest way to read input in a Java program, To create an object of Scanner class, we usually pass the predefined object System.in, which represents the standard input stream. We …
Continue reading Scanner Class in JavaThe Java Math class provides more advanced mathematical calculations than what the basic Java math operators provide. The Math class contains methods for finding the maximum or minimum of two values, rounding values, logarithmic functions, square root, and trigonometric functions (sin, cos, tan etc.). The Math is located in the java.lang package, and not in the java.math package. Thus, the fully qualified class name of …
Continue reading Math Class in javaYou must have seen public, private and protected keywords while practising java programs, these are called access modifiers. An access modifier restricts the access of a class, constructor, data member and method in another class. In java we have four access modifiers: 1. default 2. private 3. protected 4. public 1. Default access modifier When …
Continue reading Java Access ModifiersEncapsulation simply means binding object state(fields) and behaviour(methods) together. If you are creating class, you are doing encapsulation. What is encapsulation? The whole idea behind encapsulation is to hide the implementation details from users. If a data member is private it means it can only be accessed within the same class. No outside class can …
Continue reading Encapsulation in JavaThe process by which one class acquires the properties(data members) and functionalities(methods) of another class is called inheritance. The aim of inheritance is to provide the reusability of code so that a class has to write only the unique features and rest of the common properties and functionalities can be extended from the another class. …
Continue reading Inheritance in Java