Configure Maven
Go to CMD and give this command:mvn --version
If you get an error as:
‘mvn’ is not recognized as an internal or external command
Then you must have to configure maven
Download maven Binary zip archive… Read more
Go to CMD and give this command:mvn --version
If you get an error as:
‘mvn’ is not recognized as an internal or external command
Then you must have to configure maven
Download maven Binary zip archive… Read more
In this project, we will pass some data through our step definitions. We will visit an e-commerce site and try to log in with valid and invalid credentials. Our goal is to pass the credentials through our step definitions.
Method name: String.concat();
public class Main { public static void main(String[] args) { String sentence1="Hello "; System.out.println(sentence1.concat("Java")); } }
Output:
Hello Java
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int[] numbers={14,12,9,15,17,21,23,5,8,25};
Arrays.sort(numbers);
System.out.println(Arrays.toString(numbers));
}
}
Output:
[5, 8, 9, 12, 14, 15, 17, 21, 23, 25]
Create a folder and open with vs code
Open terminal and hit the command:npm i puppeteer cucumber chai cucumber-html-reporter
Then go to package.json and update the following code:
"scripts": {
"test": "cucumber-js -f json:cucumber-report.json"
},
To signup a new customer, you have to call a POST HTTP Request
URL: https://customer-test-api.herokuapp.com/customer/api/v1/create
Body:
{
"id": int,
"name": "String",
"email": "String",
"address": "String",
"phone_number":"String"
}
Remove “.only” from the previous HTTP Request
Go to … Read more
Axios is a nodejs package that is used to call HTTP Request Methods.
We can call the following HTTP Request Methods:
1. GET
2. POST
3. PUT
4. PATCH
4. DELETE
At first, create a blank folder named … Read more
Then apply and ok everything
Now open the CMD with … Read more
© 2024 - Road to SDET