TFS Test Plans Merge from different Projects - testing

I would like to merge an existing MTP (Master Test Plan) defined as a Test Suite with subfolders and TestCases, into another MTP (same structured), but located in a different project in TFS2017.
The idea is to have both project sharing the same MTP, so any change can be visible in both projects.
By now, I've just seen the existing possibilities about cloning/copying test cases between different test suites, but all of them should be part of the same project.
I guess there must be an easy way of doing that merge instead of manually, but I can't find the way to do it.

We can use an Existing Test Case (by reference) cross projects, but cannot share the same Test Plan cross projects.
If you wish to have a discrete copy of a test case, test cases, or test suites across projects (to a test plan that resides in a different project), you can perform a “clone” across projects via the command line (tcm.exe).
You could do this in MTM, could also use Tcm.exe command to copy test suites.
Please reference below articles :
Copying and cloning test suites and test cases.
Microsoft Test Manager – Working Across Projects: Adding an Existing
Test Case vs.Cloning/Copying
Actually, there has been a related uservoice for your requirement: Export test plan tree between projects and collections in MTM
We have enabled both Test Plan and Test Suite clone capabilities
within the product. See
https://msdn.microsoft.com/en-us/library/hh543843.aspx
This allows you to clone test plans/test suites across projects within
a collection. For moving artifacts (including test artifacts) across
collections, you can use the “TFS Integration Platform toolkit”.
Marking this item as “Completed”.
UPDATE:
To copy test cases, or test suites across projects, you can use “clone” via the command line (tcm.exe).
Below sample for your reference:
Run cmd
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
tcm suites /clone /collection:http://server:8080/tfs/CollectionLC /teamproject:0418Scrum /suiteid:271 /destinationteamproject:TFVC-Scrum /destinationsuiteid:274 /overridefield:"System.IterationPath"="TFVC-Scrum\Sprint 2" /overridefield:"System.AreaPath"=TFVC-Scrum

Related

Azure DevOps - Multiple manual testruns in one

I have manual test plan in Azure DevOps with tree of suites that correspond to different functions in my app. Let's say it looks like this:
Now, I need to have one place where I can review tests results from whole test plan ran for particular build. Like acceptance tests.
There's no way to run multiple suites in one run, I guess. Didn't find such possibility, though. Tests ran suite by suite produce multiple testruns, which is understandable.
What I want to achieve is one link to all test results for specific build which I can provide further to PM.

Can I restore Test Cases/Test Suite I accidentally deleted from Azure DevOps

We are using Scrum and in last Sprint (Sprint2) I manually run some test cases with success. We just started new Sprint3 and I first created new test suite for Sprint3. Then I noticed there is also possibility to copy test plan and I tried to copy Test Suite 2 for Test Suite 3. After that I somehow had two test suites for Sprint3 and I deleted another of those.
Then I tried to check what was tested in Sprint2 but now those successfull test cases are not in Test Suite 2 anymore. Do you know if there is a way to return to previous state or somehow restore the tests that I already run.
Our testing is manual and Test Cases are linked to Product Backlog Items.
Unfortunately, according to this docs:
We only support permanent deletion of test artifacts such as test
plans, test suites, test cases, shared steps and shared parameters.
Deleted test artifacts won't appear in the recycle bin and cannot be
restored.
Thus the deleted test artifacts will be permanently deleted.

Run multiple Selenium Test Projects across Azure DevOps

We have a main CRM application, that used to be housed externally but has been brought in-house. We have all our stand-alone websites/apps/etc that update/read from this main application. Each of those individual projects have their own selenium tests associated with them. What I assume those projects due, is drum up the resources, builds the tests, and runs against those existing websites, and gets rid of the resources, because no longer needed.
It seems like we should be able to reference those build pipelines from one project into another. Is there a way to do this? Seems like it would be easier to manage this way.
From what I have read, copy the test dll's into the main crm project to run. Is that what is needed to be done? The test piece on the CRM application will find all those test dlls? And then all the reporting are under the main crm sometimes and sometimes under the stand alone projects in other times? I much rather would like the test results to be associated with the repos/projects associated with the functional area.
So, the solution is that you can add a deployment group, with the Deployment Group you could test the applications in different machines.
In your scenario, you could see all projects included in that deployment group under your main CRM, then you could kick off each build pipeline has your tests in them.
Please refer to Automating Selenium Tests in Azure Pipelines for details

Can you run two test cases simultaneously in a Test Suite in Microsoft Test Manager 2010?

I am trying to create a unit test to run on two machines in Microsoft Test Manager 2010. In this test I want some client and server side test code to run simultaneously; the client side test being dependent on server side test working successfully.
When putting together a Test Suite in Test Manager, I want to be able to set both tests to have the same order value (so they run at the same time) but the validation prevents this; setting the order as shown below:
Is there any way I can achieve the simultaneous test execution I am after?
Sorry for the late answer... I've missed the notification about your answers to my question :-( Sorry for that!
In case you are still looking for solution, here my suggestion.
I suppose you have a test environment consisting of two machines (for server and client).
If so, you will not be able to run tests on both of them, or better to say you will not have enough control over running tests. Check How to Run automated tests on multiple computers at the same time
Actually I posted a related question to "Visual Studio Development Forum", you could check the answers I got here: Is it possible to run test on several virtual machines, which belong to the same environment, using build-deploy-test workflow
That all means you will end up creating two environments each consisting of one machine (one for server and one for client).
But then you will not be able to reference both environment in your build definition it you can only select one environment in DefaultLabTemplate.
That leads to the solution I can suggest:
Create two lab environments
Create three build definitions
the first one will only build your test code
the second one will deploy last successful build from the first one and start tests on the server environment
the third one will deploy last successful build from the first one and start tests on the client environment.
Run the first build definition automatically at night
Trigger the latter two simultaneously later.
It's not really nice, I know...
You will have to synchronize the build definition building the test code with the two build definitions running the tests.
I was thinking about setting up similar tests some months ago and it was the best solution I came up with...
Another option I have not tried yet could be:
Use a single test environment consisting of two machines and use different roles for them (server and client respectively).
In MTM create two Test Settings (one for the server role and one for the client role).
Create a bat file starting tests using tcm.exe tool (see How to: Run Automated Tests from the Command Line Using Tcm for more details).
You will need two tcm.exe calls, one for each Test Settings you have created.
Since a tcm.exe call just queues a test run an returns (more or less) immediately this bath file will start tests (more or less) simultaneously.
Create a build definition using DefaultLabTemplate.
This definition will:
build test code
deploy them to both machines in your environment
run your bath script as the last deployment step
(you will have to make sure this script is located on the build machine or deploy it there or make it accessible from the build machine)
As I've said, I have not tried it yet.
The disadvantage of this approach will be that you will not see the test part in the build log since the tests will not be started by means provided by DefaultLabTemplate. So the build will not fail when tests fail.
But you will still be able to see test outcomes in MTM and will have test results for each machine.
But depending on what is more important to you (having rest results or having build definition that fails if tests fail or having both) it could be a solution for you.
Yes, you can with modified TestSettings file.
http://blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/executing-unit-tests-in-parallel-on-a-multi-cpu-core-machine.aspx

Merge unit test reports from multi projects Gradle build

I have a multi module Gradle script with 3 modules: common, services and web.
If I run gradle check all the test suite is performed correctly, but I don't have a single test report instead I found a test report for each subproject. How can I merge the test results?
If useful this is the script I'm using https://github.com/CarloMicieli/trenako/blob/master/build.gradle
Thanks
Carlo
The Gradle source contains a Task class used to accomplish this, which unfortunately isn't available in the public API. Basically all it does is copy all of the test reports from various projects into one directory and then run the standard test report task to get an aggregate. Check out the source code at https://github.com/gradle/gradle/blob/master/buildSrc/src/main/groovy/org/gradle/build/TestReportAggregator.groovy