Concepts Flashcards

1
Q

What are the 5 stages in a software development lifecycle (SDLC)

A

1 requirements analysis 2 design 3 development 4 testing 5 Maintenance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Statistically automation is in average _________ more beneficial than manual testing

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Automated testing provides a___________ feedback that everything in our product works properly.

A

continuous

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Automation testing is used for functional or non-functional testing?

A

Non functional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are non functional testing types

A

Performance Stress Load Endurance Scalability Volume Usability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the structure of an automated script

A

Find an element Perform some action on the element Verify the expected result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do we locate the elements?

A

Look into the HTML source code and identify HTML attributes like Id, class, CSS, Selectors, Xpaths….

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is type coercion?

A

JS automatically figures out which one of the variable it has to convert and does it. ‘Tariq26’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

console.log(name + age) example of type coercion

A

tariq52

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

console.log(age + age) example of no type coercion

A

104

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

undefined variable

A

when a variable is defined but no value is assigned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

var lastName = prompt(‘what is the last name?’);

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

alert(‘John is a thirty six year old driver. Is he married? false’)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

var ageTariq = 50;

ageTariq = 5*5+10;

console.log(ageTariq);

Is ageTariq =50 or 35 and why?

A

it is 35 because of operator precedence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

var ageTariq = 25;

ageTariq *= 2;

What is the output?

A

50

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

if (23 == ‘23’)

true or false?

A

True as == does type coercion

17
Q

if (23 === ‘23’)

true or fasle

A

false as === does not do type coercion

18
Q

whats the sexier method of writing

x = x * 2

x = x + 2

x = x - 2

A

x *= 2

x *= 2

x *- 2

19
Q

Ternary Operator

var drink = age >=18 ? ‘beer’ : ‘juice’

A

condition age>=18 is evaluated before either beer or juice value is assigned to drink.

20
Q

Why is important to use the Break statement in a switch case?

A

otherwise, the switch statement will continuously poll for a result

21
Q

var job = ‘teacher’;

switch (job) {

case = ‘teacher’:

case = instructor’:

console.log(‘John teaches kids how to code’);

Break;

A

console.log will be printed for both job is equal to teacher and Instructor

22
Q

if var Height = 0

is it classed as a defined or undefined variable?

A

undefined….

23
Q

var height =23;

if (height == ‘23’) {

console.log(‘The == operator does type coercion’);

] else

console.log(‘The == operator does not do type coercion};

A

The == operator does type coercion

24
Q

DRY

A

Don’t Repeat Yourself

25
Q

do we need a ‘break’ statement in Switch when used inside a function?

A

nope, no need as the function will break automatically when a condition is met in switch.

26
Q

A statement is a complete line of code that performs some ____________

A

action

27
Q

An expression is any section of the code that evaluates to a _______

A

Value.

28
Q

How do we display a defined array?

A

//String array of fruits defined

String[] fruits ={“Apple”, “banana”, “pear”, “kiwi};

//assign fruits to a new string variable ‘fruit’ and print it

for (String fruit:fruits) {

System.put.println(string);

}

29
Q

are both array definitions of intArray valid?

int intArray[];

or

int[] intArray;

A

An array declaration has two components: the type and the name. type declares the element type of the array. The element type determines the data type of each element that comprises the array.

In this case, only a reference of intArray is created. The size isn’t defined yet.

30
Q

Expalin the comments

int intArray[];

intArray = new int[20];

int[] intArray = new int[20];

A

//declaring array

// allocating memory to array

// combining both statements in one

31
Q
A
32
Q

What are the 3 elements of a variable?

A

type of variable

name of variable

inital value of variable

33
Q
A