The testing environment is by default completely separated from your website, so module testing is in no way affected by the environment. However you might be able to switch the database. There is this article about testing on the live database: http://www.codesidekick.com/blog/break-out-simpletest-sandbox. Basically you override some variables during setup and teardown in a class extending DrupalWebTestCase:
/**
* @file
* Common testing class for this Drupal site.
*/
abstract class SiteTesting extends DrupalWebTestCase {
/**
* Overrides default set up handler to prevent database sand-boxing.
*/
protected function setUp() {
// Use the test mail class instead of the default mail handler class.
variable_set('mail_system', array('default-system' => 'TestingMailSystem'));
$this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
$this->public_files_directory = $this->originalFileDirectory;
$this->private_files_directory = variable_get('file_private_path');
$this->temp_files_directory = file_directory_temp();
drupal_set_time_limit($this->timeLimit);
$this->setup = TRUE;
}
/**
* Overrides default tear down handler to prevent database sandbox deletion.
*/
protected function tearDown() {
// In case a fatal error occurred that was not in the test process read the
// log to pick up any fatal errors.
simpletest_log_read($this->testId, $this->databasePrefix, get_class($this), TRUE);
$emailCount = count(variable_get('drupal_test_email_collector', array()));
if ($emailCount) {
$message = format_plural($emailCount, '1 e-mail was sent during this test.', '@count e-mails were sent during this test.');
$this->pass($message, t('E-mail'));
}
// Close the CURL handler.
$this->curlClose();
}
}
Then in the test, make sure to extend your newly created class:
class SiteTestingHomePageTest extends SiteTesting {
...
}
I have never tried this, and please be aware that depending on the test, they might alter the live database (if you add a node in the test, it will show up on the site), but it might be what you are looking for. Make database backups and remove all created entities in the end of the test.
If you do not want to affect live data, you will have to add the content types and taxonomy terms manually.