You are on page 1of 5

Question Paper 1) Selenium

https://www.amazon.com/

1. Write 5 Test cases to purchase the phone.(2 marks each)

2. Now state different behavior while login and another for logouts how Test Cases will be
different.

3. If you are the owner of amazon which test cases you will do every morning.

4. If you want to automat avoid how will you do that?

5. Russian Hackers is creating fake orders, so how will you prevent it.

6. Create a local git repository with angular project

7. Commit the initial code

8. Update the code

9. Use git commands to

o Get the updated files

o List the changes

o Create a branch

o Merge branch

10. Create a repository on GitHub

11. Push the local changes to GitHub

The git push command takes two arguments:

 A remote name, for example, origin


 A branch name, for example, main

For example:

git push <REMOTENAME> <BRANCHNAME>

12. Pull the code from GitHub

https://www.freecodecamp.org/news/10-important-git-commands-that-every-developer-should-know/

13. Create and check out a branch

git checkout -b <name-of-your-branch>

14. Add a new feature, commit and push changes to GitHub


git commit -m "commit message"
git push <remote> <branch-name>

15. Create a pull request

git pull <remote>


git pull-request

16. Review the changes on GitHub and merge the branch into the main branch

17. Install and configure Jenkins

18. Build a Freestyle job using Jenkins (https://www.guru99.com/create-builds-jenkins-freestyle-


project.html)

19. Configure the angular project

20. Build the project using Jenkins

Question Paper2) Selenium

https://www.tonyrobbins.com/

1. Consider Bio website of Tony Robbins, please come up with 5 test cases

2. Which test cases (unit/integration/UI testing) is best suited for the above website and why?

3. In case you choose Selenium, who IDE and Tool you will use to write Test cases.

4. Write Selenium Test case to verify Heading of Page

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Verify_Page_Title {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://edureka.co");
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

String Actual = driver.getTitle();


String Expected = "Instructor-Led Online Training with 24X7 Lifetime Support
| Edureka";

if (Actual.equals(Expected)) {
System.out.println("Test Passed!");
} else {
System.out.println("Test Failed");
}

driver.close();
}
}

5. Write a Selenium Test case to verify the Facebook link on Page.

6. TestNg

o Explain Unit Test cases and why it is important

o Come up with 10 test cases for Calculator which can add numbers.

class Calculator{

public static int add(int a, int b){

return a+b;

o Using TestNG write code for negative number addition.

Write test cases for Integer Addition X+Y=20; Where X, Y are


integers
 Enter the value of x is 0 and the value of y as 20 and check the result.
 Enter the value of y as 0 and value of x as 20 and check the result.
 Enter the value as negative of both x and y and check the result; it would
fail.
 Enter the equal values of x and y and check the result.
 Enter X as 0 Y as integer result should be an integer
 Enter Y as 0 X as integer result should be an integer
 Enter X as a negative number, and Y as a positive number >0 results
should be an integer.
 Enter x as a positive number, and Y as negative number > 0 result should
be an integer.
 Enter x and y as negative numbers >0, and the result should be an integer.
 Enter X as 0 Y as integer result should be an integer
 Enter Y as 0 X as integer result should be an integer
 Enter X as a negative number, and Y as a positive number > 0 results
should be an integer.
 Enter x as a positive number, and Y as negative number > 0 result should
be an integer.
 Enter x and y as negative numbers >0, and the result should be an integer.

o Using TestNG write code for decimal number addition

o Explain Coverage and come up with a number for the Calculator application

7. Create a local git repository with angular project

8. Commit the initial code

9. Update the code

10. Use git commands to

o Get the updated files

o List the changes

o Create a branch

o Merge branch

11. Create a repository on GitHub

12. Push the local changes to GitHub

13. Pull the code from GitHub

14. Create and check out a branch

15. Add a new feature, commit and push changes to GitHub


16. Create a pull request

17. Review the changes on GitHub and merge the branch into the main branch

18. Install and configure Jenkins

19. Build a Freestyle job using Jenkins

20. Build and Configure the angular project in Jenkins

You might also like