Associate Protractor with TFS (MTM) - angularjs

I was wondering whether it is possible to connect my protractor tests with TFS and run it from Microsoft Test Manager.

Integration will be very limited. You can create a Generic Test in Visual Studio and associate that to your Test Case in MTM. The Generic Test can run the actual commandline that will trigger Protractor.
The only test runner that can currently directly integrate into MTM is MsTest, any other test runner needs to be wrapped by a Generic Test in order to integrate into MTM.

In previous engagements with customers i have used a T4 template to generate MS Test stubs for each of my tests in an unsupported third party tool. I then use the MTM command line tool to import the generated Tests as Test Cases in MTM. Then you can run them against an environment.

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 run command-line process in karma

I am writing an integration test (not a unit test) for my AngularJS / CouchDB application using Karma. I realize that in unit tests mocking the database is important. I am deliberately NOT mocking the database since this is an integration test. I explicitly DO want to interact with the database. I also do NOT want to use protractor for these integration tests. The motivation for these integration tests is to move tests that don't necessarily rely on the UI away from protractor to increase the overall speed of our tests.
The following works when I run code in protractor exec("my command that loads data into the database").
In karma exec() is not available. How would you run a shell command in karma? Given how karma works, is this even possible?
If karma is not the best way to run integration tests, what would you recommend that I do?
Perhaps there is some way to run the shell command while karma is starting up?

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

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.

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!

Resources