Autopsy
4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Classes | |
class | AllConnectionInfo |
class | IntegrationTestDiffException |
class | IntegrationTestServiceException |
Public Member Functions | |
void | runIntegrationTests () throws IntegrationTestDiffException, IntegrationTestServiceException |
Private Member Functions | |
void | addDataSourcesToCase (List< String > pathStrings, String caseName) |
Case | createCaseWithDataSources (String workingDirectory, String caseOutputPath, String caseName, CaseType caseType, List< String > dataSourcePaths) throws CaseActionException, NoCurrentCaseException, IllegalStateException, IllegalArgumentException |
CentralRepoDbChoice | getCurrentChoice () |
int | parseIntOrDefault (String toBeParsed, int defaultVal) |
ConnectionConfig | pushActiveMqSettings (ConnectionConfig connectionInfo) throws UserPreferencesException |
ConnectionConfig | pushCentralRepoSettings (ConnectionConfig connectionInfo) throws CentralRepoException |
CentralRepoDbChoice | pushCurrentCrChoice (CentralRepoDbChoice curChoice) throws CentralRepoException |
AllConnectionInfo | pushNewMultiUserSettings (AllConnectionInfo connectionInfo) throws UserPreferencesException, CentralRepoException |
ConnectionConfig | pushPostgresSettings (ConnectionConfig connectionInfo) throws UserPreferencesException |
ConnectionConfig | pushSolrSettings (ConnectionConfig connectionInfo) |
ConnectionConfig | pushZookeeperSettings (ConnectionConfig connectionInfo) |
void | runIngest (Case openCase, IngestJobSettings ingestJobSettings, String caseName) |
Object | runIntegrationTestMethod (IntegrationTestGroup testGroup, Method testMethod, Object[] parameters) |
OutputResults | runIntegrationTests (TestingConfig testSuiteConfig) |
void | runIntegrationTestSuite (EnvConfig envConfig, CaseType caseType, TestSuiteConfig testSuiteConfig) throws CaseActionException, NoCurrentCaseException, IllegalStateException, IllegalArgumentException |
void | setCurrentChoice (CaseType caseType) throws CentralRepoException |
boolean | writeDiff (String outputPath, String goldPath, String diffPath) throws DiffServiceException |
Static Private Attributes | |
static final ConfigDeserializer | configDeserializer = new ConfigDeserializer() |
static final ConfigurationModuleManager | configurationModuleManager = new ConfigurationModuleManager() |
static final int | DEFAULT_ACTIVEMQ_PORT = 61616 |
static final int | DEFAULT_POSTGRES_PORT = 5432 |
static final int | DEFAULT_SOLR_PORT = 8983 |
static final int | DEFAULT_ZOOKEEPER_PORT = 9983 |
static final DiffService | diffService = new DiffService() |
static final Logger | logger = Logger.getLogger(IntegrationTestService.class.getName()) |
Main entry point for running integration tests. Handles processing parameters, ingesting data sources for cases, and running items implementing IntegrationTests.
Definition at line 76 of file IntegrationTestService.java.
|
private |
Adds the data sources to the current case.
pathStrings | The list of paths for the data sources. |
caseName | The name of the case (used for error messages). |
Definition at line 642 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.testutils.IngestUtils.addDataSource(), and org.sleuthkit.autopsy.datasourceprocessors.DataSourceProcessorUtility.getOrderedListOfDataSourceProcessors().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.createCaseWithDataSources().
|
private |
Creates a case with the given data sources.
workingDirectory | The base working directory (if caseOutputPath or dataSourcePaths are relative, this is the working directory). |
caseOutputPath | The case output path. |
caseName | The name of the case (unique case name appends time stamp). |
caseType | The type of case (single user / multi user). |
dataSourcePaths | The path to the data sources. |
Definition at line 614 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.addDataSourcesToCase(), org.sleuthkit.autopsy.casemodule.Case.createAsCurrentCase(), org.sleuthkit.autopsy.coreutils.TimeStampUtils.createTimeStamp(), org.sleuthkit.autopsy.integrationtesting.PathUtil.getAbsolutePath(), org.sleuthkit.autopsy.integrationtesting.PathUtil.getAbsolutePaths(), and org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTestSuite().
|
private |
Definition at line 294 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getSelectedDbChoice().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
private |
Parses a string to an integer or uses the default value.
toBeParsed | The string to be parsed to an integer. |
defaultVal | The default value to be used if no integer can be parsed. |
Definition at line 542 of file IntegrationTestService.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushPostgresSettings(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushSolrSettings(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushZookeeperSettings().
|
private |
Updates active mq connection settings returning the previous settings. If connectionInfo is null or missing necessary data, no update occurs and null is returned.
connectionInfo | The connection configuration or null. |
UserPreferencesException |
Definition at line 401 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.events.MessageServiceConnectionInfo.getHost(), org.sleuthkit.autopsy.core.UserPreferences.getMessageServiceConnectionInfo(), org.sleuthkit.autopsy.events.MessageServiceConnectionInfo.getPassword(), org.sleuthkit.autopsy.events.MessageServiceConnectionInfo.getPort(), org.sleuthkit.autopsy.events.MessageServiceConnectionInfo.getUserName(), and org.sleuthkit.autopsy.core.UserPreferences.setMessageServiceConnectionInfo().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings().
|
private |
Sets up the central repo connection information.
connectionInfo | The connection information for central repository. |
Definition at line 497 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresConnectionSettings.DEFAULT_PORT, org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getDbSettingsPostgres(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.getHost(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.getPassword(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.getPort(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.getUserName(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.saveSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.setHost(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.setPassword(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.setPort(), and org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings.setUserName().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings().
|
private |
Sets the current CentralRepoDbChoice and returns the old value.
curChoice | The current choice to be selected. |
CentralRepoException |
Definition at line 306 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getSelectedDbChoice(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.saveNewCentralRepo(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.setSelctedDbChoice().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.setCurrentChoice().
|
private |
Updates all multi user settings to those provided in connectionInfo. If connectionInfo or child items (i.e. postgres/mq/solr) are null, they are ignored and null is returned.
connectionInfo | The connection info or null if no setup to be done. |
UserPreferencesException |
Definition at line 335 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushActiveMqSettings(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushCentralRepoSettings(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushPostgresSettings(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushSolrSettings(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushZookeeperSettings().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
private |
Updates postgres connection settings returning the previous settings. If connectionInfo is null or missing necessary data, no update occurs and null is returned.
connectionInfo | The connection configuration or null. |
UserPreferencesException |
Definition at line 361 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.PostgresConnectionSettings.DEFAULT_PORT, org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.DEFAULT_POSTGRES_PORT, org.sleuthkit.autopsy.core.UserPreferences.getDatabaseConnectionInfo(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.parseIntOrDefault(), and org.sleuthkit.autopsy.core.UserPreferences.setDatabaseConnectionInfo().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings().
|
private |
Updates solr connection settings returning the previous settings. If connectionInfo is null or missing necessary data, no update occurs and null is returned. Username and password are currently ignored.
connectionInfo | The connection configuration or null. |
Definition at line 435 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.config.ConnectionConfig.getHostName(), org.sleuthkit.autopsy.core.UserPreferences.getIndexingServerHost(), org.sleuthkit.autopsy.core.UserPreferences.getIndexingServerPort(), org.sleuthkit.autopsy.integrationtesting.config.ConnectionConfig.getPort(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.parseIntOrDefault(), org.sleuthkit.autopsy.core.UserPreferences.setIndexingServerHost(), and org.sleuthkit.autopsy.core.UserPreferences.setIndexingServerPort().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings().
|
private |
Sets up the zookeeper connection information.
connectionInfo | The connection information for zookeeper. |
Definition at line 467 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.DEFAULT_ZOOKEEPER_PORT, org.sleuthkit.autopsy.integrationtesting.config.ConnectionConfig.getHostName(), org.sleuthkit.autopsy.integrationtesting.config.ConnectionConfig.getPort(), org.sleuthkit.autopsy.core.UserPreferences.getZkServerHost(), org.sleuthkit.autopsy.core.UserPreferences.getZkServerPort(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.parseIntOrDefault(), org.sleuthkit.autopsy.core.UserPreferences.setZkServerHost(), and org.sleuthkit.autopsy.core.UserPreferences.setZkServerPort().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings().
|
private |
Runs ingest on the current case.
openCase | The currently open case. |
ingestJobSettings | The ingest job settings to be used. |
caseName | The name of the case to be used for error messages. |
Definition at line 671 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.casemodule.Case.getDataSources(), and org.sleuthkit.autopsy.testutils.IngestUtils.runIngestJob().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTestSuite().
|
private |
Runs a test method in a test suite on the current case.
testGroup | The test suite to which the method belongs. |
testMethod | The java reflection method to run. |
parameters | The parameters to use with this method or none/empty array. |
Definition at line 748 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.IntegrationTestGroup.setup(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestGroup.tearDown().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
void org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests | ( | ) | throws IntegrationTestDiffException, IntegrationTestServiceException |
Main entry point for running all integration tests.
Definition at line 141 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.PathUtil.getAbsolutePath(), org.sleuthkit.autopsy.integrationtesting.config.IntegrationCaseType.getCaseTypes(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getCrConnection(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.getCurrentChoice(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getDbConnection(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getDiffOutputPath(), org.sleuthkit.autopsy.integrationtesting.config.IntegrationTestConfig.getEnvConfig(), org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer.getIntegrationTestConfig(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getMqConnection(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getRootGoldPath(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getRootTestOutputPath(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getSolrConnection(), org.sleuthkit.autopsy.integrationtesting.config.IntegrationTestConfig.getTestSuites(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getWorkingDirectory(), org.sleuthkit.autopsy.integrationtesting.config.EnvConfig.getZkConnection(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushCurrentCrChoice(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushNewMultiUserSettings(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTestSuite(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.setCurrentChoice(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.writeDiff().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTestSuite().
|
private |
Runs the integration tests and serializes results to disk.
testSuiteConfig | The configuration for a particular case. |
Definition at line 688 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.integrationtesting.config.TestingConfig.getParameters(), org.sleuthkit.autopsy.integrationtesting.config.TestingConfig.hasIncludedTest(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTestMethod().
|
private |
Runs a single test suite.
envConfig | The integrationt test environment config. |
caseType | The type of case (single user, multi user). |
testSuiteConfig | The configuration for the case. |
Definition at line 561 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.casemodule.Case.closeCurrentCase(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.createCaseWithDataSources(), org.sleuthkit.autopsy.integrationtesting.PathUtil.getAbsolutePath(), org.sleuthkit.autopsy.casemodule.Case.getCurrentCase(), org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIngest(), and org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
private |
Definition at line 314 of file IntegrationTestService.java.
References org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.POSTGRESQL_CUSTOM, org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushCurrentCrChoice(), and org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.SQLITE.
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
private |
Writes any differences found between gold and output to a diff file. Only works if a gold and diff location are specified in the EnvConfig. If there is a diff, throw an exception.
outputPath | Path to yaml output directory. |
goldPath | Path to yaml gold directory. |
diffPath | Path to where diff should be written if there is a diff. |
Definition at line 784 of file IntegrationTestService.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.runIntegrationTests().
|
staticprivate |
Definition at line 133 of file IntegrationTestService.java.
|
staticprivate |
Definition at line 135 of file IntegrationTestService.java.
|
staticprivate |
Definition at line 125 of file IntegrationTestService.java.
|
staticprivate |
Definition at line 124 of file IntegrationTestService.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushPostgresSettings().
|
staticprivate |
Definition at line 126 of file IntegrationTestService.java.
|
staticprivate |
Definition at line 129 of file IntegrationTestService.java.
Referenced by org.sleuthkit.autopsy.integrationtesting.IntegrationTestService.pushZookeeperSettings().
|
staticprivate |
Definition at line 134 of file IntegrationTestService.java.
|
staticprivate |
Definition at line 131 of file IntegrationTestService.java.
Copyright © 2012-2022 Basis Technology. Generated on: Sun Apr 2 2023
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.