Jenkins - selenium test groups

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Jenkins - selenium test groups

include85
Hi guys!
I'm using Jenkins for execute my tests on more machines in parallel.

In section Build I invoke Ant 1.8.2 and I set browser and web site.

I would set also a group, for example:
browser=win_firefox11.0
webSite=http://27.xxxx.net
group=seltest

but group doesn't work!
Maybe I wrong to write....in file.java I write this:
@Test(groups={"seltest"})

Thanks.

GC
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins - selenium test groups

softwaretestingforum
Administrator
Are you not able to execute test using ant build?
I am not sure what you are asking. Could you elaborate more?
If it is your ant build which is problematic, then could you post it?
Also are you able to execute test using testng eclipse (if you are using eclipse) plug-in?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins - selenium test groups

include85
I would know what to write on jenkins, section build ant, for execute my tests using group property.
Do you know Jenkins/Hudson?

Thanks Tarun;)
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins - selenium test groups

softwaretestingforum
Administrator
Yup, I indeed know jenkins.

You can use groups in testng.xml file to run your tests on the basis of groups as described here

Now you can invoke testng.xml file from ant build. Refer this example Notice run  target which specifies the testng.xml file. Now run target of ant build should be specified in build section of jenkins to run tests.

Does this answer your question?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins - selenium test groups

include85
Yes, thanks.

I add in testng.xml the groups, so:
<groups>
            <run>
                <define name="all">
                    <include name="staging"/>
                    <include name="seltest"/>
                    <include name="live"/>
                    <include name="test"/>
                </define>
                <include name="staging"/>
                <include name="seltest"/>
            </run>
        </groups>

and this in build.xml:
<arg value="-groups" />
<arg value="${groups}" />

and now works!

Thanks;)