Given the following comment I found on Can enable tests for sandbox projects, testing is disabled on sandbox projects, which means you cannot enable automatic tests on sandbox projects.
From pift_project_visibility()
:
if (!empty($node->field_project_has_releases[LANGUAGE_NONE][0]['value'])) {
// Ensure user has the 'access project testing tab' permission
if (user_access('access pift project testing tab')) {
return TRUE;
}
}
So as long as the releases piece is taken care of, the 'enable' checkbox should never appear (and thus users will not be able to enable testing).
The issue has been created in the project that handles the automatic testing for projects hosted on drupal.org. The comment says that the automatic tests are enabled for the projects with enabled releases. Sandbox projects don't have releases enabled, so also the automatic tests are disabled.
As Drupal.org Git administrator I can confirm that none of the sandbox projects has the Automated testing tab, which I instead see on full projects. (It's not a matter of permissions, as my role on Drupal.org allows me to set automatic tests for any project.)
To answer How did you enable automated testing on this sandbox project? that project has automatic tests enabled because it's a full project, despite the project name. I can say that because the path alias automatically set for a sandbox project is similar to https://www.drupal.org/sandbox/grayside/1876908
, the path alias for the #Heading module. Furthermore, a sandbox project has a Promote tab as in the following screenshot.
For the other project, this is what I see.