Specifically to your question on "Disable Parallel Apex Testing". No, I don't believe there is currently an official method in the Tooling API that exposes this setting.
That said, with Salesforce DX Scratch orgs we are being told that it will be possible to fully configure the org from a config file. That would imply a way to toggle all these otherwise unexposed settings.
Update: (via @bufuda) The ApexSettings for a scratch org now include a enableDisableParallelApexTesting
setting that:
Indicates whether Apex tests are serially executed (true) or not (false). The default value is false.
There is an article from Bob Buzzard on doing a deploy to update the setting after the org has been created. Note that this is via the Metadata rather than Tooling API.
Alternative example of doing this in vscode using a dedicated metadata file.
Path: force-app\main\default\settings\Apex.settings-meta.xml
Metadata file:
<?xml version="1.0" encoding="UTF-8"?>
<ApexSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<enableDoNotEmailDebugLog>true</enableDoNotEmailDebugLog>
<enableDisableParallelApexTesting>true</enableDisableParallelApexTesting>
<enableCompileOnDeploy>false</enableCompileOnDeploy>
</ApexSettings>
Then push this to the org to have the changes reflected.
If you want to go with the unsupported route there you can use the Chrome developer tools to see exactly how that setup page works.
**Request URL:**https://abc.salesforce.com/_ui/common/apex/test/ApexTestQueueServlet
Request Method: POST
Form Data
action: SET_OPTIONS
onlyStoreAggregateCoverage: false
disableParallelApexTesting: true
testAutonumber: false
You could quite easily replicate that POST request (including the sid cookie). If you do so, know that it could break at any point as it isn't an official API.