Navigation
index
modules
|
Autopilot 1.5 documentation
»
Global Contents
ΒΆ
What is Autopilot, and what can it do?
Where is Autopilot used?
How does Autopilot fit with other test frameworks?
What do Autopilot Tests Contain?
Autopilot Tutorial
Writing Your First Test
Files and Directories
A Minimal Test Case
The Setup Phase
Starting the Application
A Simple Test
Running Autopilot
A Test with Interaction
The Eventually Matcher
Advanced Autopilot Features
Cleaning Up
Test Scenarios
Test Logging
Environment Patching
Custom Assertions
Platform Selection
Gestures and Multi-touch
Single-Touch
Multi-Touch
Advanced Backend Picking
Default Creation
Picking a Backend
Possible Errors when Creating Backends
Keyboard Backends
A quick introduction to the Keyboard backends
Limitations of the different Keyboard backends
Process Control
Display Information
Writing Custom Proxy Classes
Launching Applications
Writing Good Autopilot Tests
Write Expressive Tests
Test One Thing Only
Fail Well
Think about design
Test Length
Good docstrings
Test Readability
Prefer
wait_for
and
Eventually
to
sleep
In Tests
In Proxy Classes
Scenarios
Multiplying Scenarios
Do Not Depend on Object Ordering
Running Autopilot
List Tests
Run Tests
Common use cases
Launching an Application to Introspect
Visualise Introspection Tree
Installing Autopilot
Ubuntu
Other Linux’s
Autopilot API Documentation
autopilot
- Global stuff
autopilot.application
- Autopilot Application Launchers
autopilot.display
- Get information about the current display(s)
autopilot.emulators
- Backwards compatibility for autopilot v1.2
autopilot.exceptions
- Autopilot Exceptions
autopilot.gestures
- Gestural and multi-touch support
autopilot.input
- Generate keyboard, mouse, and touch input events
Autopilot unified input system.
autopilot.introspection
- Retrieve proxy objects
autopilot.introspection.types
- Introspection Type details
Autopilot proxy type support.
autopilot.matchers
- Custom matchers for test assertions
autopilot.platform
- Functions for platform detection
autopilot.process
- Process Control
autopilot.testcase
- Base class for all Autopilot Test Cases
Quick Start
Porting Autopilot Tests
A note on Versions
Porting to Autopilot v1.4.x
Gtk Tests and Boolean Parameters
select_single
Changes
DBus backends and
DBusIntrospectionObject
changes
Python 3
Porting to Autopilot v1.3.x
QtIntrospectionTestMixin
and
GtkIntrospectionTestMixin
no longer exist
autopilot.emulators
namespace has been deprecated
Page Object Pattern
Introducing the Page Object Pattern
1. The public methods represent the services that the page offers.
2. Try not to expose the internals of the page.
3. Methods return other PageObjects
4. Assertions should exist only in tests
5. Need not represent an entire page
6. Actions which produce multiple results should have a test for each result
Frequently Asked Questions
Autopilot: The Project
Q. Where can I get help / support?
Q. Which version of autopilot should I install?
Q. Should I write my tests in python2 or python3?
Q: Should I convert my existing tests to python3?
Q. Where can I report a bug?
Q. What type of applications can autopilot test?
Autopilot Tests
Q. Autopilot tests often include multiple assertions. Isn’t this bad practise?
Q. How do I write a test that uses either a Mouse or a Touch device interchangeably?
Q. How do I use the Onscreen Keyboard (OSK) to input text in my test?
Autopilot Tests and Launching Applications
Q. How do I launch a Click application from within a test so I can introspect it?
Q. How do I access an already running application so that I can test/introspect it?
Autopilot Qt & Gtk Support
Q. How do I launch my application so that I can explore it with the vis tool?
Q. What is the impact on memory of adding objectNames to QML items?
Contribute
Autopilot: Contributing
Q. How can I contribute to autopilot?
Q. Where can I get help / support?
Q. How do I download the code?
Q. How do I submit the code for a merge proposal?
Q. How do I list or run the tests for the autopilot source code?
Q. Which version of Python can Autopilot use?
Troubleshooting
General Techniques
Common Questions regarding Failing Tests
Q. Why is my test failing? It works some of the time. What causes “flakyness?”
StateNotFoundError Exception
Appendices
XPathSelect Query Protocol
DBus Interface
Object Trees
Selecting Objects
Selecting the Root Object
Absolute Queries
Relative Queries
Mixed Queries
Attribute Queries
Wildcard Nodes
Selecting All Children
Selecting Nodes based on Attributes
Invalid Wildcard Queries
Returning State Data
Valid IDs
Special Attributes
Example GetState Return Values
Quick search
Enter search terms or a module, class or function name.
Navigation
index
modules
|
Autopilot 1.5 documentation
»