UI tests have supported re-engineering of the Cookpad iOS app, which has over 35 million users. The app is developed continuously, releasing every 2-4 weeks. UI tests were implemented in 2014 to check external and internal changes as the app is re-written and refactored. Automated UI tests help reduce fear for developers during re-engineering. They also help ensure quality and stability as the mobile environment and services change frequently. UI tests are important for legacy re-engineering projects to enable continuous development.
10. Cookpad for iOS(Japan and Global)
35 million users
(include Web/mobile)
63 million users
(include Web/mobile)
4Q and Full Year 2016 Results / https://cf.cpcdn.com/info/assets/wp-content/uploads/20170214121206/2016Q4en.pdf
22. Make checkable from external to internal
Unit Tests
UI Tests
re-write/re-factor
23. Make checkable from external to internal
Unit Tests
UI Tests
re-write/re-factor
External
24. Make checkable from external to internal
Unit Tests
UI Tests
re-write/re-factor
Internal
25. Make checkable from external to internal
Unit Tests
UI Tests
re-write/re-factor
External
26. Make checkable from external to internal
Unit Tests
UI Tests
re-write/re-factor
27. Unit tests for Re-Engineering
Most developers would agree that unit test
should be fully automated,
Re-Engineering Legacy Software
28. Unit tests are not a silver bullet
but the level of automation for other kind of
tests(such as integration tests) is often much
lower.
Re-Engineering Legacy Software
29. UI Test should be automated
One area that cries out for automation is
UI testing.
Re-Engineering Legacy Software
38. Architecture for UI Tests
Scenarios steps wrapper
Appium
Binding
Focus on
User Scenario
Convert scenarios
to Ruby code
Appium/other utils
Focus on iOS side
👪
39. Scenarios with data-driven testing
feature: A user can search several words via search field
background:
given Conduct tests with ‘iPhone’ device
scenario_outline: Users can see search results
when I login with <user_status>
when I search <search_words> via search fields
then I swipe down ‘3’ times
then I can see ‘xxx’ on the display
example:
| user_status | search_words |
| 'ps' | 'sushi' |
| 'non-ps' | '🍣' |
| 'guest' | 'sukiyaki' |
40. steps/wrapper/bindings
step "Conduct tests with :device device" do |device|
start_device(device)
end
def start_device(device)
driver_start_with(desired_capabilities: des_app_caps,
server_caps: des_server_caps)
set_location(DEFAULT_LOCATION)
close_initial_information(device)
end