|
/runTestsAsynchronous/: GET
|
1/runTestsAsynchronous/?classids=
2<comma separated list of class
3 IDs>
Executes the tests in the specified classes. Running tests asynchronously
allows methods to process in parallel, cutting down your test run times.
|
Not supported. |
|
/runTestsAsynchronous/: POST with comma-separated lists |
1/runTestsAsynchronous/ Body:
2{"classids":"<comma-separated
3 list of class IDs>",
4"suiteids":"<comma-separated
5 list of test suite IDs>",
6"maxFailedTests":"<integer
7 value>"}
- Runs one or more methods within one or more
Apex
classes, using the asynchronous test execution mechanism.
- You can POST both a
suiteids list and a classids list to runTestsAsynchronous. However, if you
send a tests array, you can’t send
suiteids or classids.
- You can also POST an
optional maxFailedTests parameter.
To allow all
tests in your run to execute, regardless of how many tests fail, omit
maxFailedTests or set it to
-1. To stop the test run from
executing new tests after a given number of tests fail, set maxFailedTests to an integer value from
0 to 1,000,000. This integer value sets the
maximum allowable test failures. A value of 0 causes the test run to stop if any
failure occurs. A value of 1
causes the test run to stop on the second failure, and so on. Keep in
mind that high values can cause slow performance. Each 1,000 tests
that you add to your maxFailedTests value adds about 3 seconds to your test
run, not including the time that the tests take to
execute.
|
|
API Version 38.0 and Later:
1/runTestsAsynchronous/ Body:
2{"classNames":
3 "<comma-separated list
4 of class names>",
5"classids":
6 "<comma-separated list
7 of class IDs>",
8"suiteNames":
9 "<comma-separated list
10 of test suite names>",
11"suiteids":
12 "<comma-separated list
13 of test suite IDs>",
14"maxFailedTests":
15 "<integer value>",
16"testLevel":"<TestLevel
17 enum value>"}
|
|
API Version 37.0:
1/runTestsAsynchronous/ Body:
2{"classids":
3 "<comma-separated list
4 of class IDs>",
5"suiteids":
6 "<comma-separated list
7 of test suite IDs>",
8"maxFailedTests":
9 "<integer value>",
10"testLevel":"<TestLevel
11 enum value>"}
|
|
|
/runTestsAsynchronous/: POST with JSON |
1/runTestsAsynchronous/ Body:
2{"tests":<tests array>}
Example <tests
array>: 1[{
2 "classId":
3 "01pD0000000Fhy9IAC",
4 "testMethods": [
5 "testMethod1",
6 "testMethod2",
7 "testMethod3"
8 ]
9}, {
10 "classId":
11 "01pD0000000FhyEIAS",
12 "testMethods": [
13 "testMethod1",
14 "testMethod2",
15 "testMethod3"
16 ]
17}, {
18 "maxFailedTests": "2"
19}]
- Runs one or more methods within one or more
Apex
classes, using the asynchronous test execution mechanism.
- <tests
array> is an array of objects that represent Apex test
classes, each of which has a classId and a testMethods parameter, and an optional maxFailedTests parameter.
-
Multiple occurrences of a test method name in
a testMethods array are ignored.
Test methods that don’t exist are skipped. A null or missing testMethods array specifies that all test
methods in the test class are run.
- To allow all
tests in your run to execute, regardless of how many tests fail, omit
maxFailedTests or set it to
-1. To stop the test run from
executing new tests after a given number of tests fail, set maxFailedTests to an integer value from
0 to 1,000,000. This integer value sets the
maximum allowable test failures. A value of 0 causes the test run to stop if any
failure occurs. A value of 1
causes the test run to stop on the second failure, and so on. Keep in
mind that high values can cause slow performance. Each 1,000 tests
that you add to your maxFailedTests value adds about 3 seconds to your test
run, not including the time that the tests take to
execute.
|
1/runTestsAsynchronous/ Body:
2{"tests":<tests array>}
Example <tests
array>: 1[{
2 "classId":
3 "01pD0000000Fhy9IAC",
4 "testMethods": [
5 "testMethod1",
6 "testMethod2",
7 "testMethod3"
8 ]
9}, {
10 "classId":
11 "01pD0000000FhyEIAS",
12 "testMethods": [
13 "testMethod1",
14 "testMethod2",
15 "testMethod3"
16 ]
17}, {
18 "maxFailedTests": "2"
19}, {
20 "testLevel":
21 "RunSpecifiedTests"
22}]
|
|
/runTestsSynchronous/: GET
|
1/runTestsSynchronous/?classnames=
2<comma-separated list of class
3 names>
Executes the tests in the specified classes using the synchronous test
execution mechanism.
|
Not supported. |
|
/runTestsSynchronous/: POST
|
1/runTestsSynchronous/ Body:
2{"tests":<tests array>}
Example <tests
array>: 1[{
2 "classId":
3 "01pD0000000Fhy9IAC",
4 "testMethods": [
5 "testMethod1",
6 "testMethod2",
7 "testMethod3"
8 ]
9}, {
10 "maxFailedTests": "2"
11}]
- Runs one or more methods within an Apex
class, using the synchronous test execution mechanism. All test methods
in a synchronous test run must be in the same class.
- <tests array> is an
array of an object that represents an Apex test
class—which has a classId and a
testMethods parameter—and an
optional maxFailedTests
parameter.
- Multiple occurrences of a test method name in
a testMethods array are ignored.
Test methods that don’t exist are skipped. A null or missing testMethods array specifies that all test
methods in the test class are run
- To allow all
tests in your run to execute, regardless of how many tests fail, omit
maxFailedTests or set it to
-1. To stop the test run from
executing new tests after a given number of tests fail, set maxFailedTests to an integer value from
0 to 1,000,000. This integer value sets the
maximum allowable test failures. A value of 0 causes the test run to stop if any
failure occurs. A value of 1
causes the test run to stop on the second failure, and so on. Keep in
mind that high values can cause slow performance. Each 1,000 tests
that you add to your maxFailedTests value adds about 3 seconds to your test
run, not including the time that the tests take to
execute.
|
1/runTestsSynchronous/ Body:
2{"tests":<tests array>}
Example <tests
array>: 1[{
2 "classId":
3 "01pD0000000Fhy9IAC",
4 "testMethods": [
5 "testMethod1",
6 "testMethod2",
7 "testMethod3"
8 ]
9}, {
10 "maxFailedTests": "2"
11}]
- Runs one or more methods within an Apex
class, using the synchronous test execution mechanism. All test methods
in a synchronous test run must be in the same class.
- For API 40.0 and later, running Apex tests synchronously using the POST
method for /runTestsSynchronous/
requires the View Setup user permission.
-
<tests array> is an
array of an object that represents an Apex test
class—which has a classId and a
testMethods parameter—and an
optional maxFailedTests
parameter.
- Multiple occurrences of a test method name in
a testMethods array are ignored.
Test methods that don’t exist are skipped. A null or missing testMethods array specifies that all test
methods in the test class are run
- To allow all
tests in your run to execute, regardless of how many tests fail, omit
maxFailedTests or set it to
-1. To stop the test run from
executing new tests after a given number of tests fail, set maxFailedTests to an integer value from
0 to 1,000,000. This integer value sets the
maximum allowable test failures. A value of 0 causes the test run to stop if any
failure occurs. A value of 1
causes the test run to stop on the second failure, and so on. Keep in
mind that high values can cause slow performance. Each 1,000 tests
that you add to your maxFailedTests value adds about 3 seconds to your test
run, not including the time that the tests take to
execute.
|