Shravani91
BAN USERI think this should be good enough. Let me know if any improvements need to be made
Test strategy
--------------------------
scope of testing - search, display, categories, functionality, UI (in the web app), microphone, amazon lens, QR code (in the mobile app)
types of testing - UI, functionality, performance, stress, compatibility, accessibility
Test plan for Amazon product search
--------------------------------------------------
scope - search, display, functionality, UI, dropdown, categories ( in the web app), amazon lens, QR code(in the mobile app)
Test strategy -
UI - selenium with TestNG for parallel testing on different devices and browsers
functionality - Enter, search and display - selenium, appium, real devices
Performance - response time to the search query - neoload
Stress - Hit with more than 10K search queries using automation - neoload
Compatibility - different devices, different browser versions, mobile devices, mobile browsers, web browsers, hybrid devices(tablet, laptop with tablet)
accessibility - color contrast, screen reader
Entry criteria for functional testing - Make sure the build is stable and passed the smoke test
Create the test cases and automate them, run functionality test, UI test, compatibility test, accessibility test, and regression test.
When the defects are low and all the above tests have passed with no/little minor bugs, do the performance test, load test, and stress test.
Compare the RTM with the test cases and make sure you have tested all the features and everything is passed before signing off.
Here is my python solution without using any inbuilt functions
def findFrequency(string:str)->dict:
char_freq = {}
for char in string:
if char in char_freq:
char_freq[char] += 1
else:
char_freq[char] = 1
return char_freq
If the given input is an array
def findFrequency2(nums:list)->dict:
num_freq = {}
for num in nums:
if num in num_freq:
num_freq[num] += 1
else:
num_freq[num] = 1
return num_freq
Another Python solution
def findDistance(sentence:str, s:str,e:str)->int:
if s in sentence and e in sentence:
return abs(sentence.index(s)-sentence.index(e))
return -1
Here is my python solution
def findDistance(sentence:str,start:str,end:str)->int:
if len(sentence) == 0:
return 0
elif start not in sentence or end not in sentence:
return -1
elif start == end and start in sentence and sentence.count(start) > 1:
s_index = sentence.find(start)
e_index = sentence.find(end,s_index+1,len(sentence))
return abs(e_index - s_index)
elif start != end:
return abs(sentence.index(start)-sentence.index(end))
else:
return -1
s = "Ajay is here"
st,en = 'A','h'
print(findDistance(s,st,en))
st,en = 'e','k'
print(findDistance(s,st,en))
st,en = 'g','z'
print(findDistance(s,st,en))
My approach for this in Python
1. First solution - using HASHMAP
2. Second solution - using inbuild count() method
- Shravani91 April 15, 2022