Package com.qspin.qtaste.io

Examples of com.qspin.qtaste.io.CSVFile


    }
    public int getTestcaseCount() {
        File testDataFileName = new File(f + File.separator + StaticConfiguration.TEST_DATA_FILENAME);
        try {
            CSVFile testDataFile = new CSVFile(testDataFileName);
            return testDataFile.getCSVDataSet().size();
        } catch (FileNotFoundException ex) {
            //
            return -1;
        } catch (IOException ex) {
            //
View Full Code Here


        File testDataFile = new File(f + File.separator + StaticConfiguration.TEST_DATA_FILENAME);
        if (!testScriptFile.canRead() || !testDataFile.canRead()) {
            return false;
        }
        try {
            CSVFile csvFile = new CSVFile(testDataFile);
            return !csvFile.getCSVDataSet().isEmpty();
        } catch (Exception ex) {
            return false;
        }
    }   
View Full Code Here

            try {
                ArrayList<TestDataNode> arrayDataNode = new ArrayList<TestDataNode>();
                // load test case data
                File tcDataFile = this.getPythonTestScript().getTestcaseData();
                if (tcDataFile== null) return new Object[]{};
                CSVFile csvDataFile = new CSVFile(tcDataFile);
                List<LinkedHashMap<String, String>> data = csvDataFile.getCSVDataSet();
                Iterator<LinkedHashMap<String, String>> it = data.iterator();
                int rowIndex = 1;
                while (it.hasNext()) {
                    LinkedHashMap<String, String> dataRow = it.next();
                    if (dataRow.containsKey("COMMENT")) {
View Full Code Here

    public void loadCSVFile(String fileName) {
        try {
            m_TestDataModel.removeTableModelListener(tableListener);
            m_TestDataTable.getColumnModel().removeColumnModelListener(m_TableColumnModelListener);
            CSVFile csvFile = new CSVFile(fileName);
            List<String> columnNames = csvFile.getColumnNames();
            List<LinkedHashMap<String, String>> csvDataSet = csvFile.getCSVDataSet();
            m_TestDataModel.setRowCount(0);
            m_TestDataModel.setColumnCount(0);

            m_TestDataModel.addColumn("#");
            for (String name : columnNames) {
View Full Code Here

                }
            });
            int returnVal = chooser.showDialog(TestDataEditor.this, "Load");
            if (returnVal == JFileChooser.APPROVE_OPTION) {
                try {
                    CSVFile csvFile = new CSVFile(chooser.getSelectedFile().getAbsoluteFile().getCanonicalPath());
                    List<LinkedHashMap<String, String>> csvDataSet = csvFile.getCSVDataSet();
                    int numberRows = csvDataSet.size();
                    if (numberRows > 0) {
                        int rowIndex = 0;
                        if (numberRows != 1) {
                            String[] possibleValues = new String[numberRows];
View Full Code Here

        File csvFile = new File(directory + File.separator + StaticConfiguration.TEST_DATA_FILENAME);
        File xmlFile = new File(directory + File.separator + StaticConfiguration.TEST_REQUIREMENTS_FILENAME);
        if (scriptFile.exists() && csvFile.exists()) {
            // test case directory: add test script
            try {
                List<LinkedHashMap<String, String>> csvDataSet = new CSVFile(csvFile).getCSVDataSet();
                List<TestRequirement> xmlRequirements;
                if ( xmlFile.exists() ) {
                  xmlRequirements = new XMLFile(xmlFile).getXMLDataSet();
                } else {
                  xmlRequirements = new ArrayList<TestRequirement>();
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.io.CSVFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.