McAfee Interview Question
SDETsCountry: India
Interview Type: Written Test
you need three values for each p=49,50,51 and q=49,50,51, check with swapping values in test.
Both true
p+q > 100 -->
(51+50) > 100
p>50
so p = 51 q = 50 will cover both the conditions
now try to fail both the condition
both false
p+q < 100 and p<50
for this you can take p =30 and q = 10.
1st false but second is true
p+q < 100 but p>50
p=51 q = 40
1st true and second false
p+q>100 and p<50
p = 49 and q=70
so this way various execution paths will be covered
q>0&&q>50
- tarunkumargupta14 January 26, 2015p>o&&p>50