I’m new to Selenium WebDriver, Currently working on reporting testcases & test suits using TestNG (import org.testng.Reporter)on eclipse, At present TestNG produces high level reporting features for test cases ,methods & suites on test- output folder, similar to this --> http://testng.org/test-output/index.html.
I'm looking for a way to have following in the report created by testNG,
All selenium commands executed in my test method(s) should be displayed in index.html &
Failed screenshots for the relevant failure command with the reports, something similar to loggingSelenium ---> http://loggingselenium.sourceforge.net/samples/sampleResultSuccess.html
The reason I prefer this way is its easier, because this way I know exactly what selenium commands which were executed , I would have correct information what goes wrong, and when this occurs and the input parameters belong to specific selenium commands.
Is it possible in testNG?
Related
I have got to create one common dashboard that can be used to display the execution results along with execution status and pass percentage from various test automation tools like
api - mochasome reports,
seleium- extent reports,
selenium - cucumber reports.
selenium - testng reports
pitest reports
etc..
Which tool can be used for this requirement?
Datadog might work if you can upload the reports: https://docs.datadoghq.com/continuous_integration/setup_tests/junit_upload/?tab=linux
Still looking for a solution myself too.
I'm running 11 test scenarios on 3 different system all together parallely.
S1: Win7 Firefox46.0
S2: Win10 Chrome58.0
S3: Mac Safari9.0
After completion I can see the test failure in TestNG report but I can't track in which system the scenario is failed.
Is there any way so that I can track in which system or environment test failed.
How do yo execute the test cases? Do you do it in your build with CI-System, IDE?
On the selenium website https://github.com/SeleniumHQ/selenium/wiki/Grid2 is described how to surrender capabilities on the grid. You could deliver them as String variables and looking for their values in case of failing.
Maybe this could help you?
Using TestNG it can be very easy: Just put the browser name as a parameter into a data provider and print it in your stacktrace. It can be shortened like: "ch" for Chrome or "ff" for Firefox.
A control variable like can be useful for you if you decide to run a test case in another browser tommorow.
Suppose I have 10 test cases in my Test suite and when I execute the Test suite I get an error for test case no.7.
Now is there any way that I can restart my execution from test case no.7 after correcting the changes?
I'm using TestNG.
Do we have recovery scenarios in Selenium?
TestNG generates .xml configuration with failed tests http://testng.org/doc/documentation-main.html#rerunning
Or you can use org.testng.IRetryAnalyzer which runs failed tests again and you have more control over it.
Example here http://seleniumeasy.com/testng-tutorials/execute-only-failed-test-cases-using-iretryanalyzer.
Yes you can do that if you are using Eclipse IDE. Click on the arrow just before test class name, it will show you all the methods(test cases) of that test class. Right click on the one which you want to run. It will run that specific test only.
am new to Selenium Testing Automation Tool. I have installed the selenium IDE on my Firefox browser. I jus want to test a login page with different User.id and the Password in Selenium IDE
So where and how do i mention the set of values for the user.id and the password fields.The formation of test scripts using the multiple test data must be performed..Can anyone kindly help on this?
I figured out 2 ways:
Either create n different test scripts for Login with different usname/pwd combination.
Store the data in a file.Read the file and identify the row count and apply the loop for same...for login and logout...to test various uname pwd combination.
Not sure about using Selenium IDE for this. You might have some luck implementing something that can read in your test data from a properties file or something.
My experience is limited to C# and Java Selenium bindings, but that is how we handled test execution with multiple data sets in those languages.
So my typical workflow is
I write a data driven test using TestNG in IntelliJ.
I supply hundreds of data items
Run the test and one or two of them fail
I see the list of passed/failed tests in the "Run" pane.
I would like the ability to just right click that "instance" of the test and run that test alone (with breakpoints). Currently IntelliJ does not seem to have that feature. I would have to right click the test and when I run, it runs the whole set of tests with hundreds of data points.
Is this possible?
TestNG supports this at the testng.xml level, where you can specify which indices of your data provider should be used. It's called "invocation-numbers" and you can see what it looks like by running a test with a data provider, failing some of its invocation numbers and looking at the testng-failed.xml that gets generated.
Back to your question: your IDE needs to support this feature in order to make it available in the UI, so I suggest you ask on the IDEA forums
The feature has been added as of Intellij 142.1217: https://youtrack.jetbrains.com/issue/IDEA-57906