diff --git a/Testing/test/qa-functional/src/org/sleuthkit/autopsy/testing/RegressionTest.java b/Testing/test/qa-functional/src/org/sleuthkit/autopsy/testing/RegressionTest.java index 88b01a0fe3..d544648ccf 100755 --- a/Testing/test/qa-functional/src/org/sleuthkit/autopsy/testing/RegressionTest.java +++ b/Testing/test/qa-functional/src/org/sleuthkit/autopsy/testing/RegressionTest.java @@ -29,7 +29,6 @@ import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.nio.file.Files; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -51,8 +50,8 @@ import org.netbeans.jellytools.WizardOperator; import org.netbeans.jemmy.Timeout; import org.netbeans.jemmy.Timeouts; import org.netbeans.jemmy.operators.JButtonOperator; +import org.netbeans.jemmy.operators.JListOperator; import org.netbeans.jemmy.operators.JCheckBoxOperator; -import org.netbeans.jemmy.operators.JComboBoxOperator; import org.netbeans.jemmy.operators.JDialogOperator; import org.netbeans.jemmy.operators.JFileChooserOperator; import org.netbeans.jemmy.operators.JLabelOperator; @@ -81,7 +80,6 @@ public class RegressionTest extends TestCase { private static final Logger logger = Logger.getLogger(RegressionTest.class.getName()); long start; - private static final File img_path = new File(System.getProperty("img_path")); /** * Constructor required by JUnit @@ -98,34 +96,17 @@ public class RegressionTest extends TestCase { NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(RegressionTest.class). clusters(".*"). enableModules(".*"); - if (img_path.isFile()) { - conf = conf.addTest("testNewCaseWizardOpen", - "testNewCaseWizard", - "testStartAddImageFileDataSource", - "testConfigureIngest1", - "testConfigureHash", - "testConfigureIngest2", - "testConfigureSearch", - "testAddSourceWizard1", - "testIngest", - "testGenerateReportToolbar", - "testGenerateReportButton"); - } - - if (img_path.isDirectory()) { - conf = conf.addTest("testNewCaseWizardOpen", - "testNewCaseWizard", - "testStartAddLogicalFilesDataSource", - "testConfigureIngest1", - "testConfigureHash", - "testConfigureIngest2", - "testConfigureSearch", - "testAddSourceWizard1", - "testIngest", - "testGenerateReportToolbar", - "testGenerateReportButton"); - } - + conf = conf.addTest("testNewCaseWizardOpen", + "testNewCaseWizard", + "testStartAddDataSource", + "testConfigureIngest1", + "testConfigureHash", + "testConfigureIngest2", + "testConfigureSearch", + "testAddSourceWizard1", + "testIngest", + "testGenerateReportToolbar", + "testGenerateReportButton"); return NbModuleSuite.create(conf); @@ -171,7 +152,7 @@ public class RegressionTest extends TestCase { wo.btFinish().clickMouse(); } - public void testStartAddImageFileDataSource() { + public void testStartAddDataSource() { logger.info("Starting Add Image process"); WizardOperator wo = new WizardOperator("Add Data"); JTextFieldOperator jtfo0 = new JTextFieldOperator(wo, 0); @@ -184,22 +165,6 @@ public class RegressionTest extends TestCase { wo.btNext().clickMouse(); } - public void testStartAddLogicalFilesDataSource() { - logger.info("Starting Add Logical Files process"); - WizardOperator wo = new WizardOperator("Add Data"); - JComboBoxOperator comboBoxOperator = new JComboBoxOperator(wo); - // select the item indexed 2 (Logical Files) from the drop-down list. - comboBoxOperator.selectItem(2); - JButtonOperator addButtonOperator = new JButtonOperator(wo, "Add"); - addButtonOperator.pushNoBlock(); - JFileChooserOperator fileChooserOperator = new JFileChooserOperator(); - fileChooserOperator.setCurrentDirectory(img_path); - // set the current directory one level above the directory containing logicalFileSet folder. - fileChooserOperator.goUpLevel(); - fileChooserOperator.chooseFile(img_path.getName()); - wo.btNext().clickMouse(); - } - public void testAddSourceWizard1() { WizardOperator wo = new WizardOperator("Add Data"); while (!wo.btFinish().isEnabled()) { diff --git a/test/script/regression.py b/test/script/regression.py index 5f5f09dd65..e90093f530 100755 --- a/test/script/regression.py +++ b/test/script/regression.py @@ -743,11 +743,11 @@ class TestConfiguration(object): self.build_path = build_path def _init_imgs(self, parsed_config): - """Initialize the list of images to run tests on. Logical file set also included.""" + """Initialize the list of images to run tests on.""" for element in parsed_config.getElementsByTagName("image"): value = element.getAttribute("value").encode().decode("utf_8") print ("Image in Config File: " + value) - if file_exists(value) or dir_exists(value): + if file_exists(value): self.images.append(value) else: msg = "File: " + value + " doesn't exist" diff --git a/test/script/regression_utils.py b/test/script/regression_utils.py old mode 100755 new mode 100644 index e14f86876a..53f10da281 --- a/test/script/regression_utils.py +++ b/test/script/regression_utils.py @@ -71,8 +71,6 @@ def required_input_file(name): return False def image_type(image_file): - if (dir_exists(image_file)): - return IMGTYPE.LOGICAL ext_start = image_file.rfind(".") if (ext_start == -1): return IMGTYPE.UNKNOWN @@ -88,15 +86,12 @@ def image_type(image_file): # Returns the type of image file, based off extension class IMGTYPE: - RAW, ENCASE, SPLIT, LOGICAL, UNKNOWN = range(5) + RAW, ENCASE, SPLIT, UNKNOWN = range(4) def get_image_name(image_file): path_end = image_file.rfind("/") path_end2 = image_file.rfind("\\") ext_start = image_file.rfind(".") - if (image_type(image_file) == IMGTYPE.LOGICAL): - name = image_file[path_end2+1:] - return name if(ext_start == -1): name = image_file if(path_end2 != -1):