mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Revert "Add logical files set to regression tests"
This commit is contained in:
parent
8e6383feb1
commit
907c7a265b
@ -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,10 +96,9 @@ public class RegressionTest extends TestCase {
|
||||
NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(RegressionTest.class).
|
||||
clusters(".*").
|
||||
enableModules(".*");
|
||||
if (img_path.isFile()) {
|
||||
conf = conf.addTest("testNewCaseWizardOpen",
|
||||
"testNewCaseWizard",
|
||||
"testStartAddImageFileDataSource",
|
||||
"testStartAddDataSource",
|
||||
"testConfigureIngest1",
|
||||
"testConfigureHash",
|
||||
"testConfigureIngest2",
|
||||
@ -110,22 +107,6 @@ public class RegressionTest extends TestCase {
|
||||
"testIngest",
|
||||
"testGenerateReportToolbar",
|
||||
"testGenerateReportButton");
|
||||
}
|
||||
|
||||
if (img_path.isDirectory()) {
|
||||
conf = conf.addTest("testNewCaseWizardOpen",
|
||||
"testNewCaseWizard",
|
||||
"testStartAddLogicalFilesDataSource",
|
||||
"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()) {
|
||||
|
@ -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"
|
||||
|
7
test/script/regression_utils.py
Executable file → Normal file
7
test/script/regression_utils.py
Executable file → Normal file
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user