Tuesday, November 18, 2014

Eclipse and helpful plugins

I've been using Eclipse for years on Windows and around 4 months ago decided to use it on Linux so I can use PyDev instead of PyCharm for my Python development projects on Linux (PyCharm also works on both, I am just more familiar with Eclipse than Intellij so prefer to use that IDE).  Now I use PyDev on both my Linux and Windows enviroments and havent noticed a huge difference.  Once you figure out some of the quirks, using PyDev with Eclipse as my IDE has been a big time saver.

pre-reqs

  • java jdk
    • define JAVA_HOME
  • gradle
    • define GRADLE_HOME

Windows Install:

Debian Linux Install

  • download eclipse tar.gz file
  • extract it to /usr/share
  • add /usr/share/eclipse to PATH
    • vim ~/.profile or ~/.bashrc
      • PATH="$PATH:/usr/share/eclipse" 
  • vim /usr/share/eclipse/eclipse.ini and add
    • --launcher.GTK_version
    • 2
    • /usr/share/eclipse/eclipse.ini contents
      -startup
       plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
      --launcher.library
      plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326
      -product
      org.eclipse.epp.package.java.product
      --launcher.defaultAction
      openFile
      -showsplash
      org.eclipse.platform
      --launcher.XXMaxPermSize
      256m
      --launcher.defaultAction
      openFile
      --launcher.GTK_version
      2
      --launcher.appendVmargs
      -vmargs
      -Dosgi.requiredJavaVersion=1.6
      -XX:MaxPermSize=256m
      -Xms40m
      -Xmx512m

Plugins

to install plugins, start up Eclipse and go to (assumes Kepler or Luna versions of Eclipse):
Help -> Eclipse Marketplace ...
enter name of plugin in Finder.  below are some useful/necessary plugins
  • gradle: Gradle IDE Pack
  • git: EGit - Git Team Provider (comes by default with Luna)
  • maven: Maven Integration for Eclipse (comes by default with Luna)
  • pydev: PyDev - Python IDE for Eclipse
  • testng: TestNG for Eclipse 

Issues and Workarounds

JUnit test run fails with java.lang.SecurityException...hamcrest dependency

java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:952)
  .
  .
https://code.google.com/p/hamcrest/issues/detail?id=128
I had same problem with Eclipse+Maven+Hamcrest combination. The hamcrest-library-1.3.jar in maven dependencies had collision with Eclipse embedded Hamcrest. I found corresponding issue on Eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=405276, but it is still not resolved in my Eclipse Version: Luna Release (4.4.0) Build id: 20140612-0600. So I found alternative simple solution:
    • rename the file $ECLIPSE_HOME\plugins\org.hamcrest.core_1.3.0.v201303031735.jar to something like *.bak or remove the file. Eclipse ignores the embedded Hamcrest :) and Maven dependencies will be used instead.

Wonky Eclipse maven project error

eclipse An internal error occurred during: "Updating Maven Project". Could not create bundle file.
  • open cmd box and cd to project dir
  • > mvn eclipse:eclipse
  • > mvn eclipse:clean
may need to refresh project in eclipse or delete project and reimport it.

Monday, November 17, 2014

Python for Windows/Linux, Coding Guidelines (PEP8) and PyDev...the Reader's Digest Version

Python for Windows

Download Python

  • https://www.python.org/download/
  • by default, installs to c:\Python## where ## is version number, ex Python34
  • installer updates/adds HKEY_LOCAL_MACHINE\SOFTWARE\PYTHON registry entry

Adding HKEY_CURRENT_USER Registry Entry

Some Python module installers look in the HKEY_CURRENT_USER registry entry for the Python settings so need
to get the info from there:
  • http://choorucode.com/2012/04/28/python-version-not-found-in-registry-error/
    1. open regedit
    2. navigate to Computer->HKEY_LOCAL_MACHINE->SOFTWARE->Python->PythonCore
    3. right click 3.4->Export
    4. save as .reg file on your system, ex. c:\Users\yourname\python3.4.reg
    5. edit .reg file and change all HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER
    6. open cmd box as administrator
    7. cd to where the .reg fiel was saved
    8. install using regedit command
      • c:> regedit python3.4.reg
        • keys should be successfully added to registry
        • verify using that Computer->HKEY_CURRENT_USER->SOFTWARE->Python->PythonCore exists

Python for Linux

Below are some Python libraries that I needed to download:
  • > sudo apt-get update
  • > sudo apt-get upgrade
  • > sudo apt-get install libpq-dev python-dev libjpeg-dev libpng-dev

Python Common

Installing Python Modules

Module install can be done using pip or by double clicking the module if it is an installer.

Python Communities

For Q&A with history, see the Python Forums.

Python Coding Guidelines

Pep8 is the coding convention guideline for Python.  There are different command line tools and IDE tools that can be used to help enforce the guidelines.
  • pep8.py and autopep8.py are 2 modules that can be used
  • PyDev (eclipse plugin) can be configured to use pep8
    • in eclipse, go to Window->Preferences->PyDev->Editor->Code Analysis
    • select pep8.py tab
    • choose the radio button for warning and click Ok
  • http://pep8online.com/
    • browser based python code checker
    • go to the url, paste in your code, see the code guideline violations

PyDev

PyDev is a Python IDE for Eclipse, which may be used for Python, Jython and IronPython development.  It supports code creation, code refactoring, graphical debugging, code analysis and many other features.
Below are some helpful links:
In order to use PyDev, you must have Python (3.4)  and Eclipse (Kepler or Luna) installed.  This page assumes both are already installed.

PyDev Install

PyDev is a Python IDE for Eclipse, which may be used for Python, Jython and IronPython development.  It supports code creation, code refactoring, graphical debugging, code analysis and many other features.
Below are some helpful links:
In order to use PyDev, you must have Python (2.7/3.4)  and Eclipse (Kepler or Luna) installed.  This page assumes both are already installed.
  • install  eclipse pydev plugin
    • open eclipse -> Help -> Eclipse Marketplace...
    • type Python in Find: box and hit enter
    • in PyDev -Python IDE for Eclipse, click Install
      • accept license and install
  • configure Python install location in eclipse
    • Window -> Preferences -> PyDev -> Interpreters -> Python Interpreter
    • Press the New... button and enter Interpreter Name and path to your python.exe
    • click OK,  then click OK again on the System PYTHONPATH dialog box and OK on the Python Interpreters dailog box

Configure PyDev to use pep8

    • in exclise, go to Window->Preferences->PyDev->Editor->Code Analysis
    • select pep8.py tab
    • choose the radio button for warning and click Ok

Unresolved Import Errors

Problem:
Imports cause compile errors even when path to module is appended to the sys path:
import sys
sys.path.append('..')
sys.path.append('../../lib/Core')
sys.path.append('../../lib/Insight')
from SysTestCommon import SysTestCommon
from RemoteLog import python_grep
 
Unresolved import: SysTestCommon
 
settings Found at: TestBidderReqs
from SysTestCommon import SysTestCommon

Solution:
  • make sure any folders with modules you want to import has an __init__.py
    • __init__.py file makes the folder a Python package which makes all modules in the package accessible via import statements
  • right click your pydev project and select Properties
  • select PyDev - PYTHONPATH -> External Libraries
  • select Add source folders (any folder that has an __init__.py) and add any source files you want your project to have access to
  • click OK
  • restart eclipse for change to take effect (File -> Restart)
  • your project code will then be able to import modules from those source folders.

Wednesday, July 9, 2014

Python WebDriver proof of concept

As my first Python project, I decided to see if I could read a table containing selenium actions from a confluence page.  This is just a proof of concept and is not an automation framework...but it helped me both learn a little bit about Python and see how it could be used to drive a selenium based automation framework.  Here's the code...yeah, it's just ugly text since I couldnt get the code block to work for this post .  To get a pretty-page look at it, PyCharm is a great Python IDE (see my previous post for quick notes on downloading it):

Code

__author__ = 'rhondam'
#
# barebones proof of concept python project...not pretty but it works
# This project reads a table from a confluence page (page name is hard coded...can only have one table
# on the page).  It then starts webdriver and iterates over the stored table executing webdriver commands based
# on data read from the table.
#
# It is hacked to only access elements via ids and uses simple if/elif.  If I take this further, it would need to be
# objectized and broken out into methods.  There is no exception handling...so it just dies if the element isnt present.
#
# Table needs to be in the following format:
# <table>
#   <tbody>
#     <tr>
#       <th>url</th>
#       <th>element</th>
#       <th colspan="1">element type</th>
#       <th>action</th>
#       <th colspan="1">data</th>
#       <th>expected result</th>
#     </tr>
#     <tr>
#       <td>
#         <a href="http://www.google.com">www.google.com</a>
#       </td>
#       <td> </td>
#       <td colspan="1"> </td>
#       <td> </td>
#       <td colspan="1"> </td>
#       <td> </td>
#     </tr>
#     <tr>
#       <td> </td>
#       <td>gbqfq</td>
#       <td colspan="1">id</td>
#       <td>send_keys</td>
#       <td colspan="1">Tommy Heinsohn</td>
#       <td> </td>
#     </tr>
#     <tr>
#       <td colspan="1"> </td>
#       <td colspan="1">gbqfb</td>
#       <td colspan="1">id</td>
#       <td colspan="1">click</td>
#       <td colspan="1"> </td>
#       <td colspan="1"> </td>
#     </tr>
#   </tbody>
# </table>
#
from selenium import webdriver
from collections import defaultdict
from github import Github
from xmlrpc.client import ServerProxy
import configparser
import lxml.etree
import lxml.html
import os

# execute selenium action
def web_action(web_cmd):
    element = web_cmd[1]
    element_type = web_cmd[2]
    action = web_cmd[3]
    data = web_cmd[4]
    expected_result = web_cmd[5]
    print('in web_action')
    print(element, element_type, action, data, expected_result)

    if(action == 'send_keys'):
        if(element_type == 'id'):
            driver_element = driver.find_element_by_id(element)
            driver_element.send_keys(data)
    elif(action == 'click'):
        if(element_type == 'id'):
            driver_element = driver.find_element_by_id(element)
            driver_element.click()

# enter confluence xmlrpc link and credentials
#    sample xmlrpc link: https://confluence.mycorp.com/rpc/xmlrpc
xmlrpc = input('Enter confluence xmlrpc link: ')
s = ServerProxy(xmlrpc)
user_name = input('Enter confluence username: ')
password = input('Enter confluence password: ')
auth_token = s.confluence2.login(user_name, password)
page = s.confluence2.getPage(auth_token, "~"+user_name, "Test Data Google")
content = page["content"]

# get the confluence page content
doc = lxml.html.fromstring(content)

# create dictionary for reading in table data
table_data = defaultdict(list)

print(table_data)

# read table from page
row_count = 0
for row in doc.iter('tr'):
    td = []
    td_count = 0
    for td_item in row.iter('td'):
        td.append(td_item.text_content())
        td_count += 1
    table_data[row_count].append(td)
    row_count += 1

print('td_count:  ', td_count)
print('row_count: ', row_count)
print(table_data)

# start up webdriver and execute actions from table
driver = 0
for key, value in table_data.items():
    # start webdriver and get past header row
    if(key == 0):
        driver = webdriver.Firefox()
        continue
    print(key)
    print(value[0][0])
    if(value[0][0] != '\xa0'):
        driver.get(value[0][0])
    else:
        web_action(value[0])

driver.quit()

How to run it...

I keep it simple and use PyCharm to edit and run the project.   So that it doesnt run so fast that I cant visually verify the results, I sometimes set a debug point at line 124 (the web_action call) and step over that so I can see that the google page comes up and Tommy Heinsohn search works properly.

Improvements needed

This is a real brute force project and to list all the improvements it would take to make it into a real data driven application would take me the rest of the night...and I'm tired.

Tuesday, July 8, 2014

Pyton - download, install and get Pycharm IDE

 Last week I decided to take a look a Python since it's been around quite awhile and I've never used it.  I have found it to have a simple install (with a little caveat around getting the registry keys properly configured in order to  be able to download helpful modules).  The language itself is one that a programmer can quickly pick up the basics too, although it has advanced features that will take awhile to master (at least that is so for me).  I am a self learned Java/ant hacker and I find I like the scripting ability of Python.  However, what makes it really fun and quick to come up to speed on is having a solid IDE to develop the scripts with.  That is where Pycharm comes in.  With it's debugging, auto type, auto format and other features, it makes coming up to speed with Python a much simpler task.  Below is how I got started....

Download Python

Download Python: https://www.python.org/download/
  • by default, installs to c:\Python## where ## is version number, ex Python34
  • installer updates/add HKEY_LOCAL_MACHINE\SOFTWARE\PYTHON registry entry

Adding HKEY_CURRENT_USER Registry entry

Some Python module installers look in the HKEY_CURRENT_USER registry entry for the Python settings so need to get the info there
  • http://choorucode.com/2012/04/28/python-version-not-found-in-registry-error/
    1. open regedit
    2. navigate to Computer->HKEY_LOCAL_MACHINE->SOFTWARE->Python
    3. right click 3.4 -> Export
    4. save as .reg file on your system, ex. c:\Users\yourname\python3.4.reg
    5. edit .reg file and change all HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER
    6. open cmd box as administrator
    7. cd to where .reg file was saved
    8. install using regedit command
      1. c:> regedit python3.4.reg
        • keys should be successfully added to registry
        • verify using regedit that Computer->HKEY_CURRENT_USER->SOFTWARE->Python exists

Installing Python modules

Module install can be done using pip or by double clicking the module if it is an installer.

Modules/Packages

libxml

XML processing library combining libxml2 and libxslt libraries and providing a safe and convenient access to the libraries using the ElementTree API.
  • need to install manually on windows....dont try installing using PyCharm->Settings since it requires building it which you cant do (ok you might be able to, but it wont be easy)
  • get the libxml installer

PyCharm IDE

PyCharm is a Python IDE put out by JetBrains
Adding packages (ex. PyGitHub) using PyCharm Settings
  • start PyCharm
  • File -> Settings -> Project Interpreter
  • click on the +
  • in search bar, type PyGitHub
  • click Install Package

Tuesday, June 17, 2014

Run SoapUI project as junit tests


Why run soapui tests as junit tests?

There are probably many ways of running soapui tests and generating nice reports.  The way I chose was to run them as junit tests because:
  • can run tests from a jenkins job and use surefire to generate a report containing all the results
  • can invoke the tests from an IDE - eclipse and netbeans are the only 2 I have run the project in
  • can invoke the tests from the command line using maven
  • dont need to have soapui installed on the system you are running the tests from since the jars are all included as part of the java project
Most of the above can also be done using scripts, but I wanted to go the java route and we needed to have the flexibility of running the tests on many different teardown vms and didnt want to have to install soapui on each of them.  

Create base testcase class

The SoapUITestCase class is the helper base classs for our SoapUI junit classes.  It provides the junit reporting, setting SoapUI properties and running the actual tests.  It can be extended or modified to not require using a SoapUI properties file.


/**
 * ****************************************************************************
 *
 * [ SoapUITestCase.java ]
 *
 ******************************************************************************
 */
package com.qa.soapuiTestBase;

import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;

import com.eviware.soapui.model.testsuite.ProjectRunContext;
import com.eviware.soapui.model.testsuite.ProjectRunner;
import com.eviware.soapui.model.testsuite.TestCase;
import com.eviware.soapui.model.testsuite.TestCaseRunContext;
import com.eviware.soapui.model.testsuite.TestCaseRunner;
import com.eviware.soapui.model.testsuite.TestStep;
import com.eviware.soapui.model.testsuite.TestStepResult;
import com.eviware.soapui.model.testsuite.TestSuite;
import com.eviware.soapui.model.testsuite.TestSuiteRunContext;
import com.eviware.soapui.model.testsuite.TestSuiteRunner;
import com.eviware.soapui.report.JUnitReport;
import com.eviware.soapui.report.JUnitReportCollector;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import com.eviware.soapui.tools.SoapUITestCaseRunner;
import com.qa.utils.Logtools;
import com.qa.utils.QAPropertiesSoapUI;

/**
 * Base class for soapui junit test cases.
 *
 */
public class SoapUITestCase {

    static Logger qaLogger = Logger.getLogger(Logtools.class.getName());

    /**
     * The eviware SoapUITestCaseRunner class does not provide a public method for
     * creating a JUnitSecurityReportCollector which is needed to get junit
     * output. Copied the JunitSecurityReportCollector class from github:
     * <ul>
     * <li>https://github.com/SmartBear/soapui/blob/master/soapui/src/main/java/com/eviware/soapui/tools/SoapUITestCaseRunner.java</li>
     * </ul>
     * and Override it in private JunitSoapUITestCaserRunner classbelow.
     *
     */
    private static class JunitSoapUITestCaseRunner extends SoapUITestCaseRunner {

        @Override
        protected JUnitSecurityReportCollector createJUnitSecurityReportCollector() {
            return new JUnitSecurityReportCollector() {
                JUnitReportCollector self = new JUnitReportCollector();

                @Override
                public List<String> saveReports(final String path) throws Exception {
                    return self.saveReports(path);
                }

                @Override
                public HashMap<String, JUnitReport> getReports() {
                    return self.getReports();
                }

                @Override
                public void saveReport(final JUnitReport report, final String filename) throws Exception {
                    self.saveReport(report, filename);
                }

                @Override
                public String getReport() {
                    return self.getReport();
                }

                @Override
                public void afterRun(final TestCaseRunner testRunner, final TestCaseRunContext runContext) {
                    self.afterRun(testRunner, runContext);
                }

                @Override
                public void afterStep(final TestCaseRunner testRunner, final TestCaseRunContext runContext, final TestStepResult result) {
                    self.afterStep(testRunner, runContext, result);
                }

                @Override
                public void beforeRun(final TestCaseRunner testRunner, final TestCaseRunContext runContext) {
                    self.beforeRun(testRunner, runContext);
                }

                @Override
                public void beforeStep(final TestCaseRunner testRunner, final TestCaseRunContext runContext) {
                    self.beforeStep(testRunner, runContext);
                }

                @Override
                public void beforeStep(final TestCaseRunner testRunner, final TestCaseRunContext runContext,
                                       final TestStep testStep) {
                    self.beforeStep(testRunner, runContext, testStep);
                }

                @Override
                public void reset() {
                    self.reset();
                }

                @Override
                public void afterRun(final TestSuiteRunner testRunner,
                        final TestSuiteRunContext runContext) {
                    self.afterRun(testRunner, runContext);
                }

                @Override
                public void afterTestCase(final TestSuiteRunner testRunner,
                        final TestSuiteRunContext runContext,
                        final TestCaseRunner testCaseRunner) {
                    self.afterTestCase(testRunner, runContext, testCaseRunner);
                }

                @Override
                public void beforeRun(final TestSuiteRunner testRunner,
                        final TestSuiteRunContext runContext) {
                    self.beforeRun(testRunner, runContext);
                }

                @Override
                public void beforeTestCase(final TestSuiteRunner testRunner,
                        final TestSuiteRunContext runContext,
                        final TestCase testCase) {
                    self.beforeTestCase(testRunner, runContext, testCase);
                }

                @Override
                public void afterRun(final ProjectRunner testScenarioRunner,
                        final ProjectRunContext runContext) {
                    self.afterRun(testScenarioRunner, runContext);
                }

                @Override
                public void afterTestSuite(final ProjectRunner testScenarioRunner,
                        final ProjectRunContext runContext,
                        final TestSuiteRunner testRunner) {
                    self.afterTestSuite(testScenarioRunner, runContext, testRunner);
                }

                @Override
                public void beforeRun(final ProjectRunner testScenarioRunner,
                        final ProjectRunContext runContext) {
                    self.beforeRun(testScenarioRunner, runContext);
                }

                @Override
                public void beforeTestSuite(final ProjectRunner testScenarioRunner,
                        final ProjectRunContext runContext,
                        final TestSuite testSuite) {
                    self.beforeTestSuite(testScenarioRunner, runContext, testSuite);
                }
            };
        }
    }

    /**
     * Run a SoapUI project.
     * <ul>
     * <li>get properties from soapui- file</li>
     * <li>set runner properties so junit test results are saved to output
     * folder</li>
     * <li>run the tests</li>
     * </ul>
     *
     * @param soapuiProjectXML soapui project xml file
     * results folder
     * @param propFolder - relative folder path to props folder
     * @throws Exception
     */
    public final void runSoapUIProject(final String soapuiProjectXML,
            final String propFolder) throws Exception {
        qaLogger.info(Logtools.getCurrentlyExecutingMethodName());

        SoapUITestCaseRunner runner = new JunitSoapUITestCaseRunner();
        String[] globalProps;
        String outputFolder = soapuiProjectXML.split("/")[3].split("-soapui-project.xml")[0];
        System.out.println("SoapUI test: result output folder: " + outputFolder);

        globalProps = QAPropertiesSoapUI.setProperties(propFolder); // read soapui- file

        runner.setGlobalProperties(globalProps);

        doRunSoapUIProject(soapuiProjectXML, runner, outputFolder);
    }

    /**
     * Run a SoapUI project.
     * <ul>
     *   <li>create string for project+endpoint specific folder results
     *   <li>get properties from soapui- file</li>
     *   <li>set test-endpoint global property to endpoint tests will run on
     *   <li>set runner properties so junit test results are saved to output folder specific to endpoint</li>
     *   <li>run the tests</li>
     * </ul>
     *
     * @param soapuiProjectXML soapui project xml file results folder
     * @param endpoint - String with endpoint tests are run on
     * @param propFolder - relative folder path to props folder
     * @return String - name of folder where test results are stored
     * @throws Exception
     */
    public final void runSoapUIProject(final String soapuiProjectXML,
            final String endpoint,
            final String propFolder) throws Exception {
        qaLogger.info(Logtools.getCurrentlyExecutingMethodName());

        SoapUITestCaseRunner runner = new JunitSoapUITestCaseRunner();
        String[] globalProps;
        String outputFolder = soapuiProjectXML.split("/")[3].split("-soapui-project.xml")[0] + "-" + endpoint;
        System.out.println("SoapUI test: result output folder: " + outputFolder);

        globalProps = QAPropertiesSoapUI.setProperties(propFolder); // read soapui- file

        //set the endpoint to run tests on
        for (int i = 0; i < globalProps.length; i++) {
            if (globalProps[i].contains("test-endpoint")) //string must exactly match string in props file
            {
                globalProps[i] = "test-endpoint=" + endpoint;
                break;
            }
        }

        runner.setGlobalProperties(globalProps);

        doRunSoapUIProject(soapuiProjectXML, runner, outputFolder);
    }

    /**
     * Run the actual soapui project.
     *
     * @param soapuiProjectXML - soapui project xml file
     * @param projectName - folder where test results get stored under main test
     * results folder
     * @param runner - soapui test runner instance
     * @throws Exception
     */
    private void doRunSoapUIProject(final String soapuiProjectXML,
            final SoapUITestCaseRunner runner,
            final String outputFolder) throws Exception {
        qaLogger.info(Logtools.getCurrentlyExecutingMethodName()
                + "   soapuiProjectXML: " + soapuiProjectXML);
        String soapuiSettingsFile = System.getProperty("user.dir") + "/config/soapui-settings.xml";
        String fullOutputFolder = "target/surefire-reports/" + outputFolder;



        runner.setProjectFile(soapuiProjectXML);
        runner.setExportAll(true);
        runner.setPrintReport(true); // Outputs a small table to stdout of test results.
        runner.setJUnitReport(true);
        runner.setOutputFolder(fullOutputFolder);
        runner.setSettingsFile(soapuiSettingsFile);
        try {
            runner.run();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Create junit class

The junit class is a very simple class that calls the runSoapUIProject method.  You just need to pass it the relative location and file name of your soapui xml project file and the location of the global properties you want loaded on soapui startup.  The junit test and SoapUITestCase classes can easily be modified to not require a global property file.

package com.qa.smoketestTest;


import org.junit.Test;

import com.qa.soapuiTestBase.SoapUITestCase;

/**
 * Unit test for a soapui project.  It calls the runSoapUIProject passing it:
 * <ul>
 *     <li>soapui project file including path</li>
 *     <li>folder containing soapui property file</li>
 * </ul>
 */
public class smoketestTest extends SoapUITestCase {

    @Test
    public void testquick() throws Exception {
        runSoapUIProject(
                "src/test/resources/smoketest-soapui-project.xml",
                "/../props");
    }
}

Run your junit test

I either run the junit tests from my favorite ide (right now that would be eclipse) or from the command line using maven.