Concepts Flashcards
What are the 5 stages in a software development lifecycle (SDLC)
1 requirements analysis 2 design 3 development 4 testing 5 Maintenance
Statistically automation is in average _________ more beneficial than manual testing
5
Automated testing provides a___________ feedback that everything in our product works properly.
continuous
Automation testing is used for functional or non-functional testing?
Non functional
What are non functional testing types
Performance Stress Load Endurance Scalability Volume Usability
What is the structure of an automated script
Find an element Perform some action on the element Verify the expected result
How do we locate the elements?
Look into the HTML source code and identify HTML attributes like Id, class, CSS, Selectors, Xpaths….
what is type coercion?
JS automatically figures out which one of the variable it has to convert and does it. ‘Tariq26’.
console.log(name + age) example of type coercion
tariq52
console.log(age + age) example of no type coercion
104
undefined variable
when a variable is defined but no value is assigned
var lastName = prompt(‘what is the last name?’);
alert(‘John is a thirty six year old driver. Is he married? false’)
var ageTariq = 50;
ageTariq = 5*5+10;
console.log(ageTariq);
Is ageTariq =50 or 35 and why?
it is 35 because of operator precedence
var ageTariq = 25;
ageTariq *= 2;
What is the output?
50
if (23 == ‘23’)
true or false?
True as == does type coercion
if (23 === ‘23’)
true or fasle
false as === does not do type coercion
whats the sexier method of writing
x = x * 2
x = x + 2
x = x - 2
x *= 2
x *= 2
x *- 2
Ternary Operator
var drink = age >=18 ? ‘beer’ : ‘juice’
condition age>=18 is evaluated before either beer or juice value is assigned to drink.
Why is important to use the Break statement in a switch case?
otherwise, the switch statement will continuously poll for a result
var job = ‘teacher’;
switch (job) {
case = ‘teacher’:
case = instructor’:
console.log(‘John teaches kids how to code’);
Break;
console.log will be printed for both job is equal to teacher and Instructor
if var Height = 0
is it classed as a defined or undefined variable?
undefined….
var height =23;
if (height == ‘23’) {
console.log(‘The == operator does type coercion’);
] else
console.log(‘The == operator does not do type coercion};
The == operator does type coercion
DRY
Don’t Repeat Yourself