I recently have implemented JBehave with webdriver for automation. I have few queries.
can JBehave store the results in DB after the suite is completed?
Can we modify the Jbehave report to display the buildnumber?
can we run webdriver tests to run from jbehave web runber.Example of etsy.com doesn't actually run the webdriver stories.
Can we integrate the results with web-runner. i.e instead of opening target/view.index.html , can we host it on any webserver along with web-runner.
To answer your question,
1) No, Not necessary at all.But you can write your own utility classes and call the methods for DB insertion as you wish. Here The Official selenium Database access Docs,But the DatabaseStorage interface is depreciated.
2) To make a templatable views , you need to look at here, the view generation can help you.
The solution for some of these things was to use continuous integration using Jenkins.
Create jenkins job as described here Integration of jbehave with jenkins
The results are available for all the test runs until the runs are purged in jenkins (which is configurable).
Related
I want to implement TestRunner into my project to execute the test feature wise or in the given order but couldn't find any proper document or video how to integrate TestRunner in the project, as I am new in specflow and automation so I am not getting the idea. If anyone has implemented TestRunner then, please suggest me how can I implement.
I am trying to run my Feature file using right click on Feature file and click on Run as SpecFlow Scenarios but test execution doesn't start do I need to add an extra library to execute feature file using Run as SpecFlow Scenarios.
I don't know why but 'Run SpecFlow Scenarios" button from context menu doesn't work indeed.
To be able to run your tests you need to install an adapter for your test framework.
If you use MStest then install MSTest.TestAdapter
If you use Nunit then install NUnit3TestAdapter
When you do you'll see the tests in your tests explorer:
Denis Koreyba provided what you are probably looking for.
Another way could be to run the test from the command line.
These two topics on StackOverflow provide information on how to do this, depending on your test framework:
Console Application to launch Specflow features by code not using ncode runner
How do you run SpecFlow scenarios from the command line using MSTest?
You can change the test explorer view to "Group by namespace" then you will see all the features and you can run the scenarios inside the feature. Refer below image
I have a application scenario where I am currently executing my test cases(written in selenium C#) using MTM, I want to know whether same can be achieved using selenium java from eclipse?
The same can be achieved using TFS 2015, in which we can create a new build of type ant/maven.Once the build has been created queueing the build would result in execution of test cases on pre configured agent machine.
While creating a build we need to provide build.xml (for ant) or pom.xml (for maven) which will contain all the details specific to the project and execute the same.
No
You can't use MTM to execute Java tests, however Microsoft is moving away form that model. This is likely because of this issue and they have already moved to using Team Build with VSTS & TFS 2015+ to execute all sorts of Functional Tests.
https://blogs.msdn.microsoft.com/dgartner/2016/02/23/running-selenium-tests-as-part-of-your-release-with-vsts-release-management/
They have a specific task for this and you can now associate all automated test results with Requirements for reporting without the need for Test Cases in tge middle.
Running Selenium tests having dependency to few Physical Network devices, parallely using TeamCity / CI.
Hi Guys,
I would like to run Selenium Cucumber tests JAVA-Maven using TeamCity;
We could create few maven profiles, which in turn calls set of Cucumber Test Runners.
Could you please suggest how we can achieve parallel execution using TeamCity Instances / multiple TeamCity nodes, which will correspond to categories of mentioned bespoke devices.
Without TeamCity mulitiple instances I would achieve this in following way:
Create Set of Cucumber Test Runners
Categorise them based on type of devices
Call the test runners using Maven profiles
Achieve the parallelism using maven-surefire plugin.
Maintain the active set of devices using runtime JSON file / POJO.
But kindly advise how to achieve this using TeamCity multiple agents / instances.
Many thanks
No idea how to do this in TeamCity specifically, but you may find this of use, which is a general way to run Cucumber-JVM tests in parallel using Maven. This will open multiple browsers on the same machine.
https://www.opencredo.com/2013/07/02/running-cucumber-jvm-tests-in-parallel/
If you wish to run Selenium tests across multiple machines, it sounds like what you are looking for is Selenium Grid.
My team solved the parallelization problem by using a tool that we developed and pushed to github called Zucchini. It handles the multithreading, local thread variables, and synchronization (should you need that) and has helped us scale out our tests for web, mobile and STBs nicely (especially when paired with SauceLabs)
I have written quite a few Ruby programs for my clients test automation project.But the problem is my client wants to check the output to his PC without instilling ruby.He is asking me to make one web application where he can select functionality from drop down and run the automation by clicking run button.And after completion the test it will auto generate a test result.Is there any possible way to do so?
He is asking me to make one web application where he can select functionality from drop down and run the automation by clicking run button
A work around to let your client run the current tests without installing the environment on their PC is to use the CI tool Jenkins, and a few of the Jenkins plugins such as CI Reporter which is an add-on to Test::Unit and RSpec that allows you to generate XML reports of your test and/or spec runs.
You can set Jenkins up on a server that they can hit virtually from anywhere and trigger a shell / selenium script that can execute all the unit tests and functional tests against the latest build / code, and all your client has to do is hit a "Play" button to execute them.
And after completion the test it will auto generate a test result.Is there any possible way to do so?
Here are some example images that some of the data Jenkins can export. It's really easy to set up and the community is massive in regards to support.
Screenshots of Failed Tests Results and Passed Tests Results
Hope this helps!
I have created Selenium Web Driver test cases and running it in Maven.
Can we schedule Selenium test cases to run at user-given date/time.
I googled and found few options like (1) creating a batch file & then adding it in Windows scheduler or (2) Using Jenkins
Somewhere, Quartz Scheduler was given.
Is there any other better method for it or which is the best method among these options.
Thanks !!!
We use Jenkins since it offers a variety of options to connect to different source control systems, allows building your requirement in variety of ways using scripts, maven commands, ant etc. You can create dependent jobs, use variety of plugins that add additional functionality to Jenkins, share reports, send emails ....and can schedule jobs on a variety of parameters as well like based on time or based on a commit in your repo or based on your build being deployed. I haven't used Quartz scheduler, so no opinions on that.