How can I create Pipeline with TestNG? I am creating scripts using Selenium(Java) and TestNG.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I create Pipeline with TestNG? I am creating scripts using Selenium(Java) and TestNG.

Sandeep S-2
Hi All,

 I am creating scripts using Selenium(Java) and TestNG. I see some examples here https://jenkins.io/doc/pipeline/tour/hello-world/ but I don't see example for TestNG or Selenium. 

Can any one please help me with pipeline code? What can I give in setps and agent?

I am not using Maven in my project.


pipeline {
    agent { ?????}
    stages {
        stage('build') {
            steps {
                ?????
            }
        }
    }
}


Thank you.
Sandeep Kumar

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b5e469c2-b05b-4002-a001-3ba121731883%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I create Pipeline with TestNG? I am creating scripts using Selenium(Java) and TestNG.

Victor Martinez
You can include those scripts executions as part of the sh and bats steps.


pipeline {
    agent
{ ?????}
    stages
{
        stage
(
'build') {
            steps
{
                sh
'# whatever.... commands you run to run yours scripts. bear in mind you might need to checkout your source code'
           
}
       
}
   
}
}



Regarding the agent, you might need to setup a jenkins agent (either ephemeral or permanent) with the right configuration (java version, environment variables, any other tools/binaries) in order to run your project

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/43075b0d-f909-4cfd-87e8-5cc09fc8c46d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How can I create Pipeline with TestNG? I am creating scripts using Selenium(Java) and TestNG.

itchymuzzle
In reply to this post by Sandeep S-2
What do you already have setup and working?  Jenkins server, and a node?  Jenkinsfile in place?  ...

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0a716038-fd2f-46ad-a063-7d3c228dcf1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.