Веб-приложения и технологии стремительно развиваются. Мы уже вступили в эру Single Page Application и идем к Progressive Web Application. В большинстве современных проектов идет разделение команд на front-end и back-end, и не только команд, но идет раздельная релизная политика. Это требует более детальных подходов к тестированию front-end. В этом докладе мы рассмотрим кейсы, который есть на практике при тестировании задач front-end и инструменты автоматизации, которые могут решать задачи описанные в этих кейсах: чтение request/response browser network и соответственно мокирование response.
10. Format
• Test case, that QA(tester) can write for automation
• Test case with exact steps
• Support from listed tools
• Implementation with listed tools(how to use)
11. TC on reading sent request data
1. go to
'https://trello.com/invite/b/ChLCiaJe/a981f2be7541bed7ec913a6394b
263fd/test'
2. login
3. Click on the 'Add one more card' button
4. Set a card name as 'test1'
5. Click on the 'Add card button'
ER: POST card/ was sent, in the request body name field equals 'test1'
12. Reading sent request data
(here are some restrcitions)
Support ParallelizationSupport Parallelization
27. TC on reading response data
1. go to
'https://trello.com/invite/b/ChLCiaJe/a981f2be7541bed7ec913a6394b
263fd/test'
2. login
3. Click on the 'Add one more card' button
4. Set a card name as 'test1'
5. Click on the 'Add card button'
ER: POST card/ was sent, from reposne body name field equals added
card title
37. TC on combo - reading request/response
1. go to trello table
2. add a card
3. remember added card id from response
4. edit card
ER: PUT cards/{id} was sent, where id is remembered card id
38. Combo - Reading request/response data
ParallelizationSupport
51. TC on simple mock(fake TC)
1. go to trello table
2. add a card with mocked POST card/ response, in response body just
return {name: 'mocked card'}
ER: added card title should be 'mocked card'
59. TC on mock returnung empty values in fields(fake
TC)
1. go to trello table
2. add a card with mocked POST card/ response, in response body just
return {name: ''}
ER: added card should not present on the board
67. TC on mock returnung error in fields(fake TC)
1. go to trello table
2. add a card with mocked POST card/ response, in response body just
return {name: {error: 'some error in the field'}}
ER: card should not added
75. TC on mock reposne error (fake TC)
1. go to trello table
2. add a card with mocked POST card/ response, response status is 500
ER: trere should be error handler on UI, card should not be added