The document discusses ATOMac, a Python library for automating GUI testing on Mac. It provides an overview of automation testing and defines ATOMac. It also covers the system environment and tools needed to use ATOMac, how to launch applications and interact with UI elements using ATOMac, and includes a demo.
11. • Defini+on:
– 利用程式、工具取代人工進行的測試活動
• 按你千、萬遍也不厭倦、不中斷
• Pros:
Stability
–
tested
by
program
Cost
Saving
Regression
Test
Stress
Test
Performance
Test
Automation Testing
12. • About
Me
• Automa+on
Tes+ng
• ATOMac
• System
Environment
Tools
• Usage
• Demo
• Q
A
Outline
13. • Short
for
Automated
Tes+ng
on
Mac
• The
first
Python
GUI
tes+ng
library
• Tes+ng
Mac
app
via.
• Easy
to
use
to
write
tests.
ATOMac
14. • OS
X
(10.6,
10.7,
10.8,
10.9)
• Install
Python,
Xcode
• Enable
Systemwide
accessibility
System
Preferences
Universal
Access
Enable
access
for
assis+ve
devices.
• Install
ATOMac
– sudo
easy_install
atomac
• Op+on:
iPython,
sublime
Text
2
System Environment Tools
16. • Use
ATOMac
to
launch
an
applica+on
• Get
a
reference
to
the
UI
Element
in
app
• Find
object
in
the
accessibility
hierarchy
– Xcode
à
Open
Developer
Tools
à
Accessibility
Inspector
– To
fix
the
target
element
:
fn
+
command
+
F7
• Search
method
• Control
object
Usage
17. • Get
the
App
bundle
ID
App
Localized
Name
– 活動監視器 à
Almighty
Calculator
à
取樣程序
– Process:
Almighty
Calculator
– Iden+fier:
com.ktpd.Calculator
Usage
18. • Use
ATOMac
to
launch
an
applica+on
– Import
atomac
– atomac.launchAppByBundleId('com.ktpd.Calculator')
• Get
a
reference
to
the
UI
Element
in
app
– calculator
=
atomac.getAppRefByLocalizedName('Almighty
Calculator')
• Find
object
in
the
accessibility
hierarchy
– window
=
calculator.windows()[0]
Usage