| java.lang.Object | |
| ↳ | android.support.test.rule.PortForwardingRule |
A TestRule to forward network traffic to a specific port. By default all traffic is
forwarded to default address #DEFAULT_PROXY_HOST:#DEFAULT_PROXY_PORT unless
otherwise specified
Note: Traffic forwarding will only apply to the current process under test.
This API is currently in beta.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PortForwardingRule.Builder | |||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | MAX_PORT | ||||||||||
| int | MIN_PORT | ||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Override this method to execute any code that should run after port forwarding is set up, but
before any test code is run including any method annotated with
Before. | |||||||||||
Override this method to execute any code that should run after port forwarding is restored.
| |||||||||||
Override this method to execute any code that should run before port forwarding.
| |||||||||||
Override this method to execute any code that should run before port forwarding is restored.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
|
| |||||||||||
| Parameters | |
|---|---|
proxyPort |
int |
| Parameters | |
|---|---|
base |
Statement |
description |
Description |
| Returns | |
|---|---|
Statement |
|
Override this method to execute any code that should run after port forwarding is set up, but
before any test code is run including any method annotated with Before.
Override this method to execute any code that should run after port forwarding is restored.
This method is called after each test method, including any method annotated with After.
Override this method to execute any code that should run before port forwarding. This method is
called before each test method, including any method annotated with Before.
Override this method to execute any code that should run before port forwarding is restored.
This method is called after each test method, including any method annotated with After.
| Returns | |
|---|---|
int |
|