TFS and golang continuous Integration - go

I'm tracking the files of my golang app in a local TFS server integrated with git. I want to define build, test, and deploy steps but I can't find any tool for that.
How can I define a build and test step for the project that shows the test results in the Team's web site? thank you.

You can use the vNext build system in TFS2017 and add Command Line task in the build definition to run the build and test just like what you do on local machine:
And then add a "Publish Test Result" task to publish the test result to TFS so that you can check the test result from the TFS Website. A limitation is that "Publish Test Result" task only support four Test Result Format for now: JUnit, NUnit, VSTest and XUnit.

Related

How to run unit tests in TFS (using vNext)

I have the following project in my Visual Studio 2015 solution. I want to execute jasmine tests as part of our TFS CI build. I can run my tests successfully when I open the SpecRunner.html file although I'm failing to get them to run as part of the TFS build. I've included a screen shot of my TFS build step definition. The build is successful but the tests are not executed.
Please advise, any help greatly appreciated.
Many thanks,
Project and file locations
TFS build step
First make sure your environment on the build sever is set correct. You could manually run the test on the build server.
To use a NuGet package for the Chutzpah test runner , then you can avoid having to manually unpack the VSIX and get it into source control to deploy it to the build host.
About the detail step and build definition you could take a look at this tutorial: nUnit and Jasmine.JS unit tests in TFS/VSO vNext build

How to configure TFS 2012 to use vstest.console.exe

We use TFS 2012
Through a build definition we execute automated tests from MTM test plans.
How can we ensure TFS uses vstest.console.exe to run each test?
I've read online from other posts that TFS 2012 let's you choose either MSTest or VSTest as the test runner.
I've also read that if you use MTM you effectively are locked into using a test settings file(.testsettings) which means you are locked into using MSTest. This seems to go against TFS 2012 giving you a choice.
Test Manager currently is only supporting MsTest. This is a limitation in Test Manager. It's the same issue that prevents you from associating a xUnit or NUnit test automation on a test case.
So while TFS 2012 gives you the choice, each choice comes with its own set of limitations.
To be clear:
New test runner: Work in Continuous Integration, you specify which tests to run by selecting the new agile test runner (in TFS 2013 this is a fixed choice in the default templates, template customization is required to run mstest). It can run tests during build and you can directly invoke it from the commandline if you want to run tests after deployment. You can use a .runsettings file to specify certain options it should pick up. This option is required to execute 3rd party test frameworks like NUnit, XUnit.NET, Chutzpah etc.
The MTM test runner: Execute automated tests that are associated to a Test Case work item or execute tests using the Test Agent to run tests from a remote system using the Team Test infrastructure. You can use a .testsettings file to specify certain options it should pick up. These tests will be executed using MsTest and cannot contain 3rd party test frameworks.
In your Continuous Integration build you can configure multiple Test Runs, each can be configured to a specific test framework. So you can have both options in your build.
More on the differences and how you can use the different settings files.
Over time all test options will be moved to the new test runner. In TFS 2013 the option to configure a MsTest based test run in your Build Definition has been removed by default. You will need to customize the build process to select a different test runner.

How to run Jasmine tests in TeamCity

We have been writing specifications for our JavaScript business logic using Jasmine. We're able to run our test suite within a browser, but how would we integrate this within TeamCity? Preferrably we do not want to use NodeJS, rather something as simple as possible.
I have created a modified version of run-jasmine.js that is found in the PhantomJS sources (original version is here. This version can be used within TeamCity (it will automatically detect that it is running in TeamCity). This updated version is using TeamCity service messages which allows for a nice integration.
You will need PhantomJS. You'll also need one of the following:
run-jasmine.js (for Jasmine 1.x).
run-jasmine.js (for Jasmine 2.x).
Add a build step in your TeamCity build configuration that can run this step:
phantomjs.exe run-jasmine.js index.html
index.html is your Jasmine runner page. If the build agents do not include PhantomJS, you can commit it to your repository along with your sources (this is what we do).
The result will look like this:
Test details:
The above is from a Tasks sample ASP.NET MVC project with this setup. It can be run in TeamCity using a Visual Studio (sln) build step. It will also run the tests within Visual Studio, as a pre-build step.

Publishing test results to build after running manual test in MS Test Manager

I'm exploring using Microsoft Test Manager as an option for for my company to switch over to. We already use Visual Studio/TFS for our development, source control, builds, scrum process, etc.
I've been able to use Test Manager to run manual tests, but I can't find anyway to publish these results to a build or any easy way to associate these test runs with work items.
The build summary in Visual Studio does show that a test run as having completed after I run a test in MTM against that build, but when I try to view the results I get "Downloading the selected test run failed. Test run XX does not have a run summary attachment. The .trx file is either not published or upgraded."
Is it possible to publish results to TFS after running a manual test in MTM?

How can I run all NUnit Tests in Team City?

We are using TeamCity 6.0 to build VS C# solutions each commit.
Once the build is complete, a different test TC project runs. So that developers can add/remove/edit VS unit test projects, how can I make TeamCity use the the sln file or search for test dll's?
I don't want to have to edit the build each time a new test project is added to the VS solution.
Run tests from: **\*Test*.dll Doesn't appear to work, it only get s the first Test (which is currently failing)
Fixed :) -
RTFL (Read the log!)
Run tests from: **\bin\debug\*Test*.dll

Resources