Thursday 28 June 2018

Senior QA Questions asked in Sears Holdings


What is the best definition of a Class?
a) A provision for holding state and behaviour together.
b) Can only have state and behaviour at Class level also.
c) An entity that is formed with neat boundries clear responsibilities and remains cohesive.
d) A template for an object that encapsulates state(s) amd behaviour.

Which statements are true out of the following :-
S1: Static State have same value in all objects.
S2: Non Static can have same/different value in all the object.
S3: Non Static states and behaviour belongs to Class and not to Object.
a) S1
b) S1,S2
c) S1,S3
d) S1,S2,S3

What is true about Object :-
S1: Contains all Static Stuff
S2: Gets created with initialized values of Non-Static/Static states for fields.
S3: Example of Encapsulation
a) S1,S2,S3
b) S2,S3
c) S1,S2
d) S1,S3

Same Behaviour but different implementation is: -
a. Polymorphism
b. Abstraction
c. Encapsulation
d. Inheritance

Which of the following assumption is true: -
S1: Static Global Variable
S2: Non Static Parameters
S3: Static Local Variables
S4: Non Static Method
a) S1,S3
b) S2,S3
c) S1,S2 and S4
d) All of the above

Out of the following which one is non-primitive data type: -
e. Int
f. String
g. Float
h. Boolean

Can we access Non Static stuff directly inside Static Method?
i. Yes
j. No

Can we access everything (Static, Non Static Stuff) directly inside Non Static Method :-
k. Yes
l. No

Which term is not an equivalent term of Non Static Method: -
m. Instance Method
n. Dynamic Method
o. Class Method
p. Object Method

Can we access local variables indirectly: -
q. Yes
r. No
s. Yes and No

If I am not initializing local variable but I haven’t used it anywhere then what will happen in this case :-
t. Gives Compilation Error
u. Default Initialization will happen
v. Exception will come
w. No error will come until we use the local variable anywhere

Which Statement(s) is/are False
S1: Constructor cannot be abstract
S2: Constructor can be Static
S3: It can have any return type
S4: It returns a value
a) All of the above
b) S1,S4
c) S2,S3
d) S2,S3,S4

If there is no constructor written, the primitive member variables are initialized ?
x. True
y. False

Default constructor that compiler automatically adds has an empty body?
z. True
aa. False

What will be the O/P of the following code snippet: -
public class Example2 {
public void method1(){
Map <Integer,String> map = new HashMap <Integer,String>();
map.put(1,”One”);
map.put(2,”Two”);
map.put(3,”Three”);
method2(map);
System.out.println(map.get(3));
}
private void method2(Map<Integer,String> map1){
Map1.put3(3,”Three Hundred”);
}
public static void main(String args[]){
new Example2().method1();
}
}

Name the techniques you use to write black box test cases?

If you are testing an application and you find a “bug”, what would you compile and report?

List negative tests for payment module/function in an e-commerce website.

If there is a database column whose datatype is Number(11,3) what does it mean to you ? What would be the tests (with specific numbers) that are significantly important, as you test this data type?

Identify tags, attribute names, attribute values, elements, nodes in the following xml: -
<bookstore>
<book category=”Children’s literature”>
<title lang=”en”>The Jungle Book</title>
<author>Rudyard Kipling</author>
<year>1894</year>
<price>939</price>
</book>
</bookstore>

How do you execute a test case with multiple sets of data input in TestNG or JUnit or any tool that you have use?

To a method “addTen”, a string (String s=”2016”) is given as input. The method adds 10 to the number and returns an integer in this case it returns an integer 2026. Write the method.

Consider a Drop Down menu (whose “name” attribute is “drpdwn”). Write a code snippet to select the 11th item in this dropdown.

Write a Selenium code for the following test case to be rum on “Google Chrome”: -
bb. Open a website www.abc.com
cc. Click on a link whose text is “Click Me” (That will open a new browser pop up that is not an alert box)
dd. Go to pop up and verify the title name (Expected Title is “Title 2” and the test case will pass/fail based on this validation)
ee. Close “Parent” window only.

Enjoy Interview.

2 comments:

  1. Nice Article Bro

    Visit best captions for instagram for boys to get tips and tricks of Technology, Android, Websites and others.

    ReplyDelete
  2. Nice Article Bro

    Visit how to delete telegram account permanently to get tips and tricks of Technology, Android, Websites and others.

    ReplyDelete