Can I use MTM to execute my testcases that are wriiten in Selenium Java using Eclipse IDE - selenium-webdriver

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.

Related

How can I run scenario of single Feature file in specflow

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

How to minimize all custom java script files used in an AngularJs project?

It is possible to minimize all custom java script file Manually or Automatically ?
We are using TFS for source code management , Its also possible that auto minimize Java script file by source control system or build system , when deploy code in windows Azure system or web deploy?
Note - I am not using .net application its core AngularJs application and communication done by web-api hosted on other server.
It is possible, you could integrate a build script runner like Grunt with your TFS that could minify all your javascript files. When you use Grunt you can also run it manually when developing.
I would suggest you take some time to get familiar with build script runners like Grunt to see what the possibilities are.

Questions on JBehave

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).

Test Automation Using Ruby Selenium Web Driver

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!

push deployment with test automation

We are developing some testing infrastructure and I have hit a coders block (lack of sleep?)...this seems like it would be a solved problem but I haven't found what I'm looking for via google.
I would like to automatically push builds from our CI server (TeamCity) to a number of machines (growing, but currently 30). These are several WinForms apps and a number of dlls. Once deployed, I would like to kick off tests (NUnit, for both unit and integration tests) and report all results (back to CI? or somewhere else? Not sure).
The target machines are a number of platforms (Win7,Vista, XP, Server 2k8, Server 2k3, Ubuntu, Fedora, Suse, x64, x86, maybe macs down the line)
This gets me part way there (the actual push). But I can't find existing solutions for 'push starting' the tests and reporting back. So far I am thinking of combining the link (or similar) with custom code running on each client machine that watches the deploy directory, runs the tests and reports the results.
Does anyone know of existing solutions?
Links?
Done something similar and care to share?
Edit
If possible, we prefer .net based solutions, but it isn't strictly necessary. I would have tagged the question as such, but ran out of tags :)
You could use KwateeSDCM to both push and start on all the platforms you mention, including mac. However, you'll have to do some coding to get reports out. I'm not familiar with TeamCity but maybe you could push a script along with your application which could then transfer the test results via ftp to a server accessible by TeamCity.
Have a look at: STAF (Software test Automation Framework)
The Software Testing Automation Framework (STAF) is an open source, multi-platform, multi-language framework designed around the idea of reusable components, called services (such as process invocation, resource management, logging, and monitoring).
Which includes STAX:
STAX is an execution engine which can help you thoroughly automate the distribution, execution, and results analysis of your testcases.
And there's an article here:
http://agiletesting.blogspot.com/2004/12/stafstax-tutorial.html
Assuming you have the push part done already, and you don't mind using a TeamCity license, you can create a TeamCity Command Line Runner build configuration or NUnit test configuration that kicks off the tests on a properly configured agent. The build trigger for this test config would be successful completion of the application build.
So far I have ended up using a seperate build step in TeamCity that executes a bat script that in turn fires of tasks to the list of machines using PsExec. So far my trial runs it is working ok, though I now need to parallelize the copying of build output...
Thanks for the input to those who have provided it.

Resources