Selenium Framework for Beginners 38 | How to run Selenium TestNG tests with Maven Command Line

preview_player
Показать описание
________ ONLINE COURSES TO LEARN ________

Today we will learn

1 How to run testng tests from maven cmd
2 How to provide testng xml at runtime
3 How to include or exclude specific tests

helpful tips

Prerequisite | Java

Java is installed on your system
Eclipse is available
Maven Java project is created in Eclipse

Video links see below

Prerequisite | TestNG

TestNG plugin is added in eclipse
TestNG tests are created

Video links see below

Prerequisite | Maven

Maven should be available on your system

1 Download maven
2 Add maven to environment variables

Command : mvn -version

How to add maven on Windows | Mac OS
Video links see below

How to run testng from maven command line

Step 1

Step 2
(you can provide complete path if facing any issues)

Step 3
Open cmd and goto location of project

Step 4
Run command | mvn clean test

Step 1
${fileName}

Step 2
In command add parameter

How to include or exclude specific tests

Follow

VIDEO LINKS

How to install Java on windows

How to install Java on Mac

Getting Started with Eclipse

Setup Maven Java Project in Eclipse

Install Maven on Windows

Install Maven on Mac

Adding TestNG to Eclipse

#SeleniumTestsCommandLine #TestNGCommandLine #TestNGSeleniumMaven

PLAYLISTS

KATALON STUDIO

SELENIUM BEGINNERS

SELENIUM JAVA FRAMEWORK BEGINNERS

SELENIUM TIPS

SELENIUM PYTHON

SELENIUM BUILDER

JAVA

JAVA TIPS & TRICKS

JENKINS

JENKINS TIPS & TRICKS

JMETER BEGINNER

JMETER INTERMEDIATE

JMETER ADVANCED

JMETER TIPS & TRICKS

SOAPUI

POSTMAN

GIT & GITHUB

DOCKER

ROBOT FRAMEWORK

WEB SERVICES (API)

REDIS BEGINNER TUTORIALS

MAVEN

MISC

TOOLS & TIPS

ALL PLAYLISTS

Like on FACEBOOK :

Follow on TWITTER:

Subscribe on YOUTUBE :

Never Stop Learning
Raghav
Рекомендации по теме
Комментарии
Автор

I wish I should have watch this video before attending my interview today 😊
Very important confirm I must say. Thanks for sharing.

akshaybhatia
Автор

That was exactly what I needed on my task. I had to set up two separate Jenkins jobs to run different tests from the same project repository. Thank you so much.

kosta
Автор

Thank you so much - was stuck on this problem all day and you've helped me solve it. Keep up the good work, you are an amazing teacher.

toxicjtv
Автор

Thank you for your work, Raghav! Well done!

svetlanamazhaykina
Автор

Looks really nice your tutorial. One thing: You can also use Ubuntu for win 10 - is sort of an Os inside a OS and is really helpful . Is working perfectly. Cuz my Local laptop has some issues with git account sync, one day i thought - why not trying Ubuntu Win10. Tnx again for uploading this video and Keep going!!!!

tonyatonya
Автор

I was very impressed with clarity and simplicity of presentation. Excellent !!!!

AC-vtnq
Автор

Thank very much, your channel is the better channel about automation.
Clear explanation

miketysonschwarzeneggerpra
Автор

You are making me look so good at work :-) Thank you for the videos again sir.

mzamomahaeng
Автор

Short and very clear explanation, thx!

abuqadeer
Автор

Short and crystal clear explanation.. Thank you

samikshyamishra
Автор

Thanks much for making a such a detailed video. Very useful one. I am now referring ur videos to my friends.

revathyrao
Автор

Thank you Raghav, you are very nice and share the thing you learn free for everyone, and reply most every comment...amazing...I just wondering if you can share the way how you learn new things? since there are so much to learn and it seems impossible to remember all the things at one time, but you really did a very good job and you learned so many tools and explained so clear.

louisaguo
Автор

Hi Raghav
Videos are crisp and clear 👏.
An interview question: what is the maven command to execute multiple tests ( For example: 100 tests) at a time

aswathym.r
Автор

Hi Raghav - Can you please put a video to show how to bundle this project as a jar and with executable capability so that I can take this bundle and run it on other VMs. Not just only the local machine where the project is created. For same the TestNG selenium one built from Maven.

prasadreddy
Автор

How do I add OpenCV in an executable jar with maven? Would you please make a tutorial on this or any suggestion could help. BTW you are doing great brother.

sym-john
Автор

Thanks Raghav for your effort and contribution to the community. I have a situation at work making my tests to fail on Jenkins; something that was not happening until recently.

How can I disable/close/skip browser alerts in command line for a Selenium test? Command line does not support it.

quadriyusuf
Автор

I have a complation error where it says No compiler is provided in this environment. Perhaps you are running on a JRE rather a JDK?
The problem is I have a JDK installed. I tried solutions from stackexchnage but they didn't work

scaratlas
Автор

Sir could you make a video on maven cmd parameters

siddarajus
Автор

Hi Raghav, can I run selenium by command line but without TestNG. example, I just write very basic class with open google page, no TestNG framework inside.

DucNguyen-xnbd
Автор

Thank you Raghav ..!! This was really helpful. After executing from command line I am running a test manually which basically email me emailable-report created in surefire folder. But the problem is it is mailing the earlier executed report and not the latest one. So I am first executing all test from Maven and then run that email-sending test from testng command. This solves the problem. However could you please guide me if there could be better way to achieve this ?

dnya