TFS 2012 Alert when test case fails - tfs-workitem

When using TFS 2012 we create Product Backlog Items (PBI) and assign those to a responsible developer. We generate a test suite per PBI. We'd like to alert the "owner" of the PBI (whoever the PBI is assigned to) when a test case fails that is on a suite associated with the PBI.
Does TFS 2012 support this kind of alert?
(Note: I'm using the Scrum 2.2 process template)

It does not appear this is possible through the standard TFS alerts setup. The main issue is that the status of the test case (active, passed, failed) is actually associated with a test run and not the test case itself. The test run does not appear to be a work item I can query against.
I believe we will go with creating a bug when a Test Case fails (easy enough to trigger emails regarding new bugs)...I think this maybe the more "traditional" approach in the Scrum template.

Related

Wanted to create UI interface for Business developer team which contains Test Cases

I wanted to create UI interface for Business developer team which contains Test scripts which are written in my PC in selenium with c#.
Problem :-
Business developer team has no visual studio installed in their PC
because they don't have licence for it.Now if they wanted to show
demo of Application to client then if they have UI which contains
Test scripts which i wrote in selenium.so how could i display those
Test script on business developers laptop which don't have visual
studio?
Here for demo purpose to client ,Business developer team will
click on particular test case on UI and run that feature. For
example ,If Business developer wanted to show Login feature in UI at
Business developer laptop then that script should run.
how can i define connectivity between business developer's laptop
which don't have visual studio and source laptop which has visual
studio which contain Test script?
It's kind of R & D work,If anybody has idea about this let me know.
To do this, you are going to have to setup some kind of infrastructure to support this. You could achieve this through setting up a build server and making a build plan per collection of test scripts. This is going to let the BDs run the tests, but not look into the tests till the execution is done. You will require proper reporting in order to do so.
What you could also do is use a tool like browserstack. With (I am not affiliated with browserstack what so ever) browserstack you can make every executed test viewable through their recording function and every step of every test will be administrated. This way, you execute the test once, they login into browserstack and check every test, test step, expected results, actual results, screenshots and 30 day history recording of each and every test executed.
You don't need an IDE to run your tests. The person who wishes to run tests to show off some features of the site should be able to download your test codebase and run it locally from the command line. If they don't want to pass in a lot of flags at the command line, you could bundle the commands into batch or shell scripts.

TFS 2015 Test case association with test method

I created a test case (work item) in Visual Studio Team Services (previously Visual Studio Online) and associated it with an automated test.
Can I run the automated test from the web UI ?
When I run the dll of the solution from build definition, the test is running,
but how can I get the information about the test case thats associated with the test ?
1 - You can run a build which runs your tests. I don't think you can run individual tests.
2 - You can access the test case iteration data using the DataRow property on the TestContext.
testContextInstance.DataRow["Name"].ToString();
You cant run individual automated Test Cases in the Web yet, but you can run them from Microsoft Test Manager.
On the "run" tab in MTM you can select any automated test cases and create a test run for a particular build (where it gets the DLL) and a particular environment (where that build is deployed).

How can I access The TestCategory attribute in the TFS API or TFS Report?

We have a rather complicated library of automated test. We are using TestCategory and TestProperty help us keep things clean. Now I want the ability to report on the categories after they run.
Does anyone know if the Test Category or Test Property in MSTest is accessible from the TFS Warehouse or better yet, through the TFS API?
The TestCategory is not available in the tests results and thus isn't available via warehouse or API. TestCategory can be used to filter the tests that are run during a build but that's it. So you could create different test builds based on test category and then report based on each build.
You could alternatively associate automation to your test cases, then organize your test cases into suites and organize your reports based on suites.

Why the TestCaseSource is executed before TestFixtureSetUp in Nunit

I have to create database on the setup event and drop into teardown event,the flow is working when i have not used TestCaseSource.But the moment come i have to used TestCaseSource then the execution order of NUnit test case is changed.
My database is not created (you can say setup event not called),But I have to used TestCaseSource for pulling data from table which is created by the setup event and dropped into teardown .
Please suggest how to deal this type of scenario.I am using VS 2013
Thanks in advance
I think what you are saying is that using TestCaseSource results in attempting to pull data from a database that has not been created yet (in a SetUp method).
This is just the way NUnit works, see https://github.com/nunit/nunit/issues/141
Maybe you could have TestCaseSource return the query/queries you want to test (instead of the data), and execute the query in the test (after your SetUp has run)?

Visual Studio TFS Alerts: How to send out an alert upon successful publish of a web application?

I have taken a look at alerts management for TFS 2012 after installing power tools, and I can see about four types of alert templates:
Work Item
Code Review
Check In
Build
I was wondering if there was a possibility of having a supported way to register alerts under “Publish” event-type, manageable directly via the Alerts explorer.
If not, I thought of some workarounds:
If this cannot be done and managed via the Alerts explorer, can I customize an alert to be triggered on Publish event via a Web Service? If so, does the TFS API support such customization?
I can also instead go with a continuous delivery approach and set an automated publish upon successful build of a solution, with an email alert on Build-Event Success (which would also mean that a solution has been published).
Which approach would be a supported way for setting "on publish"-event alerts for web solutions via TFS?
My suggestion would be not to use the Publish in Visual Studio but instead to use a Build to publish your solution (either triggered on check-in, or manually triggered). Then you can easily setup an alert on that build. Using a build instead of VS-Publish is also considered a better practice because it gives you more power and flexibility for the deployment process.