Java Assignments

Assignment-01: Print hello world?

  1. Create a Java project
  2. Create a Package
  3. Create a Class
  4. Print “Hello World

Assignment-02: Java coding guidelines?

  1. What is the coding guideline when Create a Class
  2. What is the coding guideline when Create a Package
  3. What is the coding guideline when Variable and Method

Assignment-03: Create all types of variables and print them?

  1. Create a class “VariableEx”
  2. Create a main method
  3. Create all type of variables (for ex: int a = 10;)
  4. Print integer and char variable.

Assignment-04: Questions on java intro, variables, data types, methods?

  1. What is the syntax of creating a object?
  2. If i want to invoke the method and variables of a class from main method, what should we do?
  3. Types of methods and their syntax?
  4. When do we use the return type “void” ?
  5. If i return a integer value from a method, can i use return type other than integer?
  6. Type of variables?
  7. Create a char variable, and print it?
  8. What file is created after compiling a java file?

Assignment-05: Create methods with and without parameters, and call those methods?

  1. Create a class called “Student”
  2. Create variables:-  int classNo, String name, int studentRollNo
  3. Create a method say “printDetails” to print student details such name, classNo, studentRollNo
  4. Create a method say “setStudentDetails” to set classNo, name, studentRollNo
  5. call the method “setStudentDetails” with the values
  6. call the method “printDetails” to print the student details

Assignment-06:  write the following programs?

  1. Print 1 to 100 odd numbers?
  2. Print 1 to 100 even numbers?
  3. Reverse the number “12345”

Selenium Assignment
Assignment-01: Take Java & Selenium Exam
Please take the exam on java & selenium.
Please download the excel sheet, and update answers in the answers column.
and send me your updated excel sheet over “hr.seleniumappium@gmail.com”
https://drive.google.com/file/d/0B59iKJ1tRhGCVDVuSUZ1RXEwNmc/view

Assignment-02: Automate below scenarios

TestCase-01:
open https://wordpress.com/
click on login link
enter invalid user name and invalid password
click on login button
check for the error message

TestCase-02:
open https://wordpress.com/
click on login link
enter user name and password
click on login button
check login is successfull

TestCase-03:
open https://wordpress.com/
click on login link
enter user name and password
click on login button
check login is successful
click on profile icon on top right of the window
You will be enter to the profile page
Enter first, last , public display name, and about me.
Click on save button.
check successfully save message note appear.

Assignment-03 : Create Maven project and run tests
– Create a maven project
– Add all selenium, testng dependencies
– Write two test methods each one in a different test class.
test1)Enter all the details in mortgage calculator app and validate Payment with PMI
test2)Enter all the details in  mortgage calculator app (make sure this time you use some other data comparatively test1)  and validate Payment with PMI
-Create a testing.xml run all tests
-Invoke tests from pom.xml

Assignment-04: Create Automation Framework with Maven,TestNG,Page Object Model, etc. and automate the following manual test cases.

TestCase1:

  • Open http://newtours.demoaut.com/
  • Click on Register
  • Enter All Fields  details in Register Page
  • Click on Submit
  • Validate the result

TestCase2:

  • Open http://newtours.demoaut.com/
  • Click on SignOn
  • Enter Invalid UserName
  • Enter Invalid Password
  • Click on Submit
  • Validate the result