Amazon Interview Question: 1. Test Case Enumeration: Wri... | Glassdoor.co.in

## Interview Question

Quality Assurance Engineer II Interview Chennai

# 1. Test Case Enumeration: Write test cases for taxi booking

application for Ola or Uber. You are expected to write testcases covering different types of functional and non-functional testing areas 2. Problem Solving: Find the first occurance of a given number from the series which has the difference between the adjacent elements as 1. For Example {1, 0, -1,-2,-1,0,1,2,3} Note: Do not use Linear Search 3. Test Data Generation Write the test data for the function: int getSmallestIntegerPosition(int[] A) This method accepts as input integer array that is already sorted and rotated "n" number of items where n is less than the size of the array For Example: The test data can be {4,5,6,1} This was derived from {1, 4, 5,6} afer sorting and rotating the array for 3 times And output of the function returns the index of integer that has the smallest value Eg: {4,5,6,1}: the smallest value is 1 and its index is 3 Note: This method searches for the element and derives the position with an order of O(log(n)) 4. Debugging While using skype or google hangout application, you are not able to do a video chat, describe how you debug the problem considering different aspects of functional and non-functional testing 5. Scripting Find the nth consecutive occurence of a character in a given string. For example for the given input string of "Amazon is a great company as it haas AtoooZzz" and the output should be "o" 6. Consider a string "Hello Good Morning" it should print the sentence in reverse order output should be "Morning Good Hello" 7. Check two strings are anagram 8. Merge two dimesional Array Consider array1 ={{10, 15}, {30, 50}} array2 ={{20,40}, {5, 10}} Merged array should be sandwitched (array 1 should be sandwitched with array 2) also while merging array if value range is less than the previously added value then that value should not be added to the merged array Output should be {10, 20, 30, 40, 50} --> 15, 5 and 10 should not be added 9. Print middle character of a string. If middle value has even then print 2 characters Eg: Amazon -->print az 10. Search an element in array without using linear search technique 11. Write test cases for Amazon Prime functionality 12. Testcases enumeration and data preperation for Whatsapp messenger

14

OLA Test Cases

- Test the installation and Unistallation of the App
- Test the login and log out of the account
- Test the emergency contact receives the SMS when a ride is started
- Test the signup for new user
- Test the ride using ola money
- Test the ola money transfer after KYC has been done
- Test the ola money transfer without doing KYC
- Test the current location picked when opened the app
- Test the favorite marking of the locations
- Test the picking of desired location
- Test the vehicle availability in mins for all the types
- Test the vehicle availability says no when there's no active driver for that type
- Test the vehicle option from source to destination
- Test the source and destination are interstate
- Test the source and destination are intercountry through land
- Test the source and destination has no roadways
- Test the source and destination between two planets
- Test the driver allocated for the ride can be called from the deep link of the app
- Test the money displayed before the ride and after ride are same when taken the given route
- Test the money displayed before the ride and after ride changes when taken the short/long route
- Test the choice of source and destination by giving lat and longs for that location
- Test the driver arrived indication is notified once he marked reached.
- Test the booking during rush hours when the demand is more
- Test the 'sorry cab didn't found' message when the search completes without booking a cab
- Test the OTP generation
- Test the SMS delivered for the booked cab or auto
- Test the OTP starts the ride. Only correct number
- Test by giving a random OTP number to start the ride
- Test the OTP number by giving vehicle number
- Test the auto deduction of ola money when the ride completes
- Test the cancellation of OLA cab/auto
- Test the cancellation charge applied after crossing the cancellation limit for that month
- Test the promo code works for each ride
- Test the OLA pass is applied if the pass hasn't been expired
- Test the fare changes for each variant like Prime, Mini, Micro
- Test Ola outstation verification
- Test the late night charges are higher than the usual
- Test the cab driver cancellation of the current booking notified in the SMS and Ola app
- Test the booking when the network has a weak signal strength

Charankumar H on 12-Aug-2018
12

Google Hangout - Unable to do video chat

- Check whether the camera is turned on
- Check whether the connected device have camera option
- Check whether the internet connection is switched off
- Check the video chat after refreshing or restarting the app
- Check whether the Gmail account had been logged out
- Check whether the camera option is disabled in the device
- Check whether the camera is not working in the device
- Check by opening the hangout in the mobile or other device
- Check by opening the hangout in different browser window
- Check by opening the hangout in different browser
- Check whether the javascript is disabled
- Check after clearing the cache of the browser
- Check after clearing the cookie of the browser

Charankumar H on 12-Aug-2018
1

def maxRepeating(str):

str = str.replace(" ", "")
print(str)

n = len(str)
count = 0
res = str[0]
cur_count = 1

# Traverse string except
# last character
for i in range(0, n-1):

# If current character
# matches with next
if (
str[i] == str[i + 1]):
cur_count += 1

# If doesn't match, update result
# (if required) and reset count
else:
if cur_count &gt; count:
count = cur_count
res = str[i]
cur_count = 1
return res
str = "Amazon is a great company as it haas AtoooZzz"
print(maxRepeating(str))

Ashritha on 18-Feb-2020
0

def maxRepeating(str):

str = str.replace(" ", "")
print(str)

n = len(str)
count = 0
res = str[0]
cur_count = 1

# Traverse string except
# last character
for i in range(0, n-1):

# If current character
# matches with next
if (
str[i] == str[i + 1]):
cur_count += 1

# If doesn't match, update result
# (if required) and reset count
else:
if cur_count &gt; count:
count = cur_count
res = str[i]
cur_count = 1
return res
str = "Amazon is a great company as it haas AtoooZzz"
print(maxRepeating(str))

Ashritha on 18-Feb-2020
0

def array_merge():
a =[[10, 15], [30, 50]]
b =[[20,40], [5, 10]]
n = len(a)
c = []

for i in range(0, n):
c.append(a[i][0])
for j in range(0,n):

if c[-1] &lt; a[i][j]:
c.append(a[i][j])
if c[-1] &lt; b[i][j]:
c.append(b[i][j])
print(c)

array_merge()

Ashritha on 18-Feb-2020
0

def search(arr, x):

# Searching x in arr[0..n-1]
n = len(arr)
i = 0

while (i &lt;= n-1):

# Checking if element is found.
if (arr[i] == x):
return i

# Else jumping to abs(arr[i]-x).
i += abs(arr[i] - x)

return -1

# Driver code
arr = [1, 0, -1,-2,-1,0,1,2,3]
n = len(arr)
x = -1

print(search(arr, x))

Ashritha on 19-Feb-2020