???? ?????????????2???????????????????????б??????????????????????????????????? ??????????????????????????????????????
????????????????????????
??????????????????ò???????????????????????ε?????????????????????????????????????????????????????????????????????????????UI???????????????????? ?????????????????????????????????????????????????????????????????????????????????????
???????google??????????????д??: ????google?????70%??????????????20%????ɡ????????10%?UI?????????????

??????????????
??????????UI????????????
???????????????п????????UI???????????????仯???????????????????????????????????????UI????????????????Щ???????????Щhappy pass??????????????????á?
?????e????????????????????????????????????????????????????????????????????????????????????????Щ??????????????????????? ??????????????? ??????BDD????????cucumber + capybara??????????UI??????????
????Scenario: test office filter in China region
????Given I login to GoHire website
????When I select "China" region
????And I select "Chengdu" option
????Then I can only see all the application cards in chengdu office
????UI?????????С????
????UI????????????ó???????????????????????e???????????????????У???????????е?????????????UI?????????????????????????????????
???????????棬??????????page object?????????????????????????????html?????????????????????????????????????
???????????????????????
?????????????У??????????????????????
??????????????У???????????????????д?????????????
????????????????????API?????????????????????????д?????????
?????????????
??????д????????????У???????????Щ???????????????API??????????????????£???????????Mock???????????
?????簸?????????????????????????????????????API???????API???????????????API???????????????????д??????????????????????а????????API????????????????????????????????????????????????????????????????????й??????
????def should_return_error_message_when_request_failed(self):
????event = {
????"body": {
????"action": "update_candidate"??
????"payload": {
????"candidate": {
????"id": 101
????}
????}
????}
????}
????with requests_mock.mock() as request_mock:
????request_mock.get("http://api.gh.test/v1/candidates/101"?? text=''?? status_code=500)
????with self.assertRaises(Exception) as context:
????webhook.handle(event)
????self.assertTrue(
????'[request error][update_candidate] get candidate 101 from Harvest API failed' in context.exception)
??????????????
????????????????????????API???????????????????????????????????????API???е?????????γ???????????????????к?????????????п??????????????Щ????bug??
????С???£??????????????API?????????????????????????????????????????????Щ??????????????????????????????????????????????ú?????????????????????????????????????????AWS?????????????з?????????????????????У???η????????????Щ?????????Щ????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????Locust?????????????????????????????????μ????е?????? ??????????????????? ??????50????????????API????????????????????к????????????????1000?Σ??漲????????????????5s??
??def get_applications_in_country(l):
????text = """Australia Brasil Canada China Chile Ecuador Germany India Italy Singapore Spain Turkey UK USA Uganda Thailand"""
????countries = text.strip().split()
????country = random.choice(countries)
????params = {
????"country": country??
????"status": "active"
????}
????with l.client.get("/getCandidates"?? params=params?? headers={"x-api-key": API_KEY}?? catch_response=True) as response:
????if "errorMessage" in response.text:
????response.failure("Error occurs in response: %s" % response.text)
????class UserBehavior(TaskSet):
????tasks = {
????get_applications_in_country: 1
????}
????
function runLocustDataStoreService {
????validateEnvironment "HOST" "API_KEY"
????setupEnv
????CLIENTS=${CLIENTS:-"50"}
????HATCH_RATE=${HATCH_RATE:-"2"}
????NUM_REQUEST=${NUM_REQUEST:-"1000"}
????locust -f DataStoreService/locustfile.py --host ${HOST} --clients=${CLIENTS} --hatch-rate=${HATCH_RATE} --num-request=${NUM_REQUEST} --no-web --only-summary
????}
???????Locust??????????????????????console?????report??

????????????report????????reqs????????API???????????fails??????????????Avg??Min??Max??Mediam?????????????????????????С??????????λ????
?????????????????????????
???????????????????С???????????????????????????????????????????????????????????????????к???????????????????£????????????????????????????д????????????????QA??????????????????????????????
????????????????????????????????
????????????????μ???????????????????????????????85%?????????????????????????????????????????????????????????????????????????е????????????????????????????????????????????????????????
????????????????????????????
?????????????????????????????????????????????棬?????????????????Ч???????????????????????? ??
????????????????д?????????
?????????????????????????????????????????????????????д?????????????????????檔?????????????????????????????????????
??????????????????????nose test?????????????????????nose test?????????????????????????????????????????У???????????????б??????????????к??????????????????????????????????

??????д???????????????????????????????????????????????????????????????????????????????????????С?????????????????У????????????????????????RDS??Postgres?????????????????????????????sqlite??python?????????????????
????????????????????????????????
?????????Щ??????????????????IDE?????????????????????У?????????????????????????????
???????????????????????????????????????????顣
???????????????????????????????????
??????????????????????????檔
????С?????г???????????????????????????

????enter image description here
????????????????????????????????ThoughtWorks??GoCD????????????????? jenkins???????????????Щ?????
??????????
????????????????????У????????????????????????????????????????????????????
???????????????????????????????????ε??????д????????????????1+1=2???????????CI?????в??????????????????????
????????????????????н??е?????????ο???????????????????????е??????????????飬???????????????85%????????鯔????????????????
????????????????????????к???д????????????
???????????????????????????????д????????????
?????????????????????????????????дUI??????????????????????д???????????
??????????????????
??????????UI????????????????????????????????????????塣
???????????????????????????????????????????????????????????????????飬????????????????У????????????????????
??????????????????????????????????????????????????????????????????????????????????????????????????????????δ?????????????????????????????????????????ζ????
??????????????????????????????У????????????????????????????????????????????????????????????????????????????????????