public interface TestRule extends BuildRule
BuildRule
that is designed to run tests.Modifier and Type | Interface and Description |
---|---|
static interface |
TestRule.TestReportingCallback
Callbacks to invoke during the test run to report information about test cases and/or tests.
|
Modifier and Type | Field and Description |
---|---|
static TestRule.TestReportingCallback |
NOOP_REPORTING_CALLBACK
Implementation of
TestRule.TestReportingCallback which does nothing. |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<String> |
getContacts() |
com.google.common.collect.ImmutableSet<String> |
getLabels() |
Path |
getPathToTestOutputDirectory() |
Callable<TestResults> |
interpretTestResults(ExecutionContext executionContext,
SourcePathResolverAdapter pathResolver,
boolean isUsingTestSelectors) |
com.google.common.collect.ImmutableList<Step> |
runTests(ExecutionContext executionContext,
TestRunningOptions options,
BuildContext buildContext,
TestRule.TestReportingCallback testReportingCallback)
Returns the commands required to run the tests.
|
boolean |
runTestSeparately() |
boolean |
supportsStreamingTests() |
compareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
static final TestRule.TestReportingCallback NOOP_REPORTING_CALLBACK
TestRule.TestReportingCallback
which does nothing.com.google.common.collect.ImmutableList<Step> runTests(ExecutionContext executionContext, TestRunningOptions options, BuildContext buildContext, TestRule.TestReportingCallback testReportingCallback)
Note: This method may be run without BuildEngine.build(com.facebook.buck.core.build.engine.BuildEngineBuildContext,
ExecutionContext, BuildRule)
having been run. This happens if the user has built [and ran] the
test previously and then re-runs it using the --debug
flag.
executionContext
- Provides context for creating Step
s.options
- The runtime testing options.buildContext
- A SourcePathResolverAdapter from the build.Callable<TestResults> interpretTestResults(ExecutionContext executionContext, SourcePathResolverAdapter pathResolver, boolean isUsingTestSelectors)
com.google.common.collect.ImmutableSet<String> getLabels()
com.google.common.collect.ImmutableSet<String> getContacts()
Path getPathToTestOutputDirectory()
boolean runTestSeparately()
boolean supportsStreamingTests()
runTests()
on this rule invokes the callbacks in testReportingCallback
as the tests run, false otherwise.