protected void runTests() {
        if (isTesting) {
            return;
        }
        final String pathToExecFile = sourceFile.getText();
        File execFile = new File(pathToExecFile);
        
        if (Config.getBoolean("checkExistence")) {
            if (!execFile.exists()) {
                // executable file does not exist
                JOptionPane.showMessageDialog(this, "Executable file does not exist.", "Wrong file", JOptionPane.ERROR_MESSAGE);
                return;
            }
            if (execFile.isDirectory()) {
                // file path points to a directory, not a file
                JOptionPane.showMessageDialog(this, "Selected path to executable is a directory.", "Wrong file", JOptionPane.ERROR_MESSAGE);
                return;
            }
            if (!Config.isPrependingCommandNonempty() && !execFile.canExecute()) {
                // application cannot execute this file
                JOptionPane.showMessageDialog(this, "Executable file cannot be executed.", "Wrong file", JOptionPane.ERROR_MESSAGE);
                return;
            } // TODO: if Config.isPrependingCommandNonempty(), then do this check for the prepending command itself
        }
        
        if (problem.getTestcaseSet().isEmpty()) {
            // no tests
            JOptionPane.showMessageDialog(this, "No tests to run.", "No tests", JOptionPane.ERROR_MESSAGE);
            return;
        }
        problem.emptyResultsOfAllTestcases();
        testTableModel.fireTableDataChanged();
        testTableModel.setTemporaryIndexesForTestcases();
        setEnabledOnInvasiveButtons(false);
        isTesting = true;
        new Thread(new Runnable() {
            @Override
            public void run() {
                problem.runTests(ProblemJPanel.this, pathToExecFile);
            }
        }).start();
        abortAllTestsButton.setEnabled(true);
        abortCurrentTestButton.setEnabled(true);
        // now tests are running, they will call notifyResultsOfSingleTestcase and notifyEndOfTesting
    }