@Override
    public void actionPerformed(ActionEvent e) {
        try {
            BmTestManager bmTestManager = BmTestManager.getInstance();
            GuiPackage guiPackage = GuiPackage.getInstance();
            if (Utils.isTestPlanEmpty()) {
                JMeterUtils.reportErrorToUser("Test-plan should have at least one Thread Group");
                return;
            }
            if (guiPackage.getTestPlanFile() == null | guiPackage.isDirty()) {
                Utils.saveJMX();
            }
            TestInfo testInfo = bmTestManager.getTestInfo();
            if (testInfo.getNumberOfUsers() == 0) {
                JMeterUtils.reportErrorToUser("Can't set up test with 0 users. " +
                        " '1' will be saved");
                testInfo.setNumberOfUsers(1);
            }
            bmTestManager.updateTestSettings(bmTestManager.getUserKey(), bmTestManager.getTestInfo());
            JMXUploader.uploadJMX();
        } catch (NullPointerException npe) {
            JMeterUtils.reportErrorToUser("Save test-plan locally before uploading");
        }

    }