How to get latest code from Visual Studio Online using alternate credentials? - tfs

As part of our continuous integration process, we want to get the latest code from Visual Studio Online in order to execute automated tests locally.
We can already download the latest builds, but we cannot execute Coded UI tests correctly with the compiled assemblies, for some reason. Thus, we want to get the latest code in order to compile and execute it locally. How could I get the latest code from Visual Studio Online from a TFVC (Team Foundation Version Control) project?

Related

How to update TFS older version of SSIS package to currently deployed version?

Using Visual Studio 2015, I checked an older version of an SSIS project into TFS. Now I want to update that version in TFS to the one currently running in production.
I know how to get an *.ispac exported from the SSIS server, but I don't know how to update the existing SSIS project in TFS with it.
The desired result is to have the same version of the SSIS project in TFS as the one currently running in production.
You need to:
Import .ispac into visual stuidio as a new project:
Import an Integration Services Project
copy packages from the new project to the project under source control.

Chutzpah & Jasmine tests - upgrade to TFS 2017 has broken tests?

We've been running javascript tests using jasmine and chutzpah for a while now. We just upgraded to TFS 2017. Our C# test run fine, but javascript tests are no longer being found by the TFS builds. (They continue to be discovered and run from Visual Studio.)
There are two suspicious messages in the build log, but I've found no useful information about either of them:
Test run will use DLL(s) built for framework .NETFramework,Version=v4.7.1 and platform X86. Following DLL(s) do not match framework/platform settings.
Chutzpah.VS2012.TestAdapter.dll is built for Framework 4.5.1 and Platform AnyCPU.
I don't know what determines the framework version, and I've read that this is a warning and not necessarily an error. That's backed up by the next error, which implies that the test adapter is being used anyway:
No test is available in c:\agent\_work\2\s\D\W\packages\Chutzpah.4.4.4\tools\Chutzpah.VS2012.TestAdapter.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Is there something about the TFS 2017 upgrade that I'm missing? Does anyone have any insight into these two error messages or how to further diagnose them?
We recently created a new javascript test project and got this running on tfs 2017 build. Just had to add the chutzpah test runner nuget package to the javascript test project enabled the vstst test runner to discover the tests.
https://www.nuget.org/packages/Chutzpah/

Using GoogleTestRunner in our TFS Build

We are using the Google Test framework (version 1.7) for unit tests in C++ project (with Visual Studio 2012 and TFS 2012). By using GoogleTestRunner for VS2012 I am able to discover the tests written in Google Test within Visual Studio and run them. So far so good :)
Now I would like to run the tests with my CI build I have set up on our TFS. Therefore I have installed the GoogleTestRunner on my build server for the user that runs our build. If I run the build (and tests) on the build server directly in Visual Studio it works - but when the build is triggered by the TFS build definition I displays the following message in the log:
No test found. Make sure that installed test discoverers & executors,
platform & framework version settings are appropriate and try again.
Any suggestion what I am missing?
Is this working for anybody at all?
Your help is highly appreciated!
Christoph
I have been able to sort it out myself :)
There is a guide showing how to get it running for NUnit. Just follow that guide and adopt it to the GoogleTestRunner:
http://bartwullems.blogspot.de/2012/10/tfs-2012-build-configure-nunit-to-run.html
I extracted the DLLs from the GoogleTestRunner.vsix file with 7zip (I assume any other Zip program would work as well). I checked in all DLLs I found there (as described in the mentioned guide) - don't know if really all DLLs are needed.

What is required for doing Unit Tests on a Build Server?

I am doing unit tests (no additional frameworks other then what comes out of the box with VS 2013).
It all works locally. What do I need to do to get it working on the build server? The build server is a TFS 2013. There are no visual studio installed other then an 2010 version. I have already moved all the 4.5 .net stuff and .targets files from my visual studio to the build server to be able to compile 4.5 dlls and azure projects.
First I had problem with the build template was using AgileRunner or something thats coming with VS2013. I changed that to MSTest. Is this the correct change? Is there any installers for MSTest only without visual studio that I can install on the build server?
My boss prefers if I can avoid installing Vs2013 on the build server.
Just install Visual Studio on the build server; It is a very common practice. The requirement is mentioned in the installation guidelines. You can have visual Studio 2010 and 2013 installed side-by-side if that is desired. There are so many parts of .NET that depend on it.
Install Visual Studio and other software to enable compilation and other capabilities
You must install on the build agent the version of Visual Studio that your team uses on its dev machines. See Installing Visual Studio. You must also install any other software and components that are installed on your dev machines and that are required to build your app.
http://msdn.microsoft.com/en-us/library/bb399135.aspx#software
You're even allowed to use an existing license for the build server, so there are no additional costs involved if you own an MSDN subscription:
Using Visual Studio on the Build Server
If you have one or more
licensed users of Visual Studio Ultimate with MSDN, Visual Studio
Premium with MSDN, or Visual Studio Professional with MSDN, then you
may also install the Visual Studio software as part of Team Foundation
Server 2013 Build Services. This way, you do not need to purchase a
Visual Studio license to cover the running of Visual Studio on the
build server for each person whose actions initiate a build.
http://www.microsoft.com/en-us/download/details.aspx?id=13350
Is there a specific reason for you boss to not want Visual Studio to be installed?
With regards to the Agile Test Runner, it is the improved test runner that shipped with Visual Studio 2012, it's the replacement of the old MsTest runner, and will replace the old MsTest runner for the last few features for which the old runner is still needed. Though the MsTest runner will still work, certain features will not be as easy to use and confugure (like Code Coverage gathering). The Agile test runner is also required for other test framwork extensibility options, including XUnit .NET, NUnit, but also Javascript Unit Test support (using Chutzpah).
Other features that will require Visual Studio to be installed include:
Code Analysis
Code coverage
MsDeploy / WebDeploy
SQL Server Data Tools
and others.
As an alternative to get just the test runners, you could attempt to install the TFS Test Controller and Agent to the server (you don't need to configure them), the Test Agent will install a number of testing related features without actually installing the Visual Studio Shell.
By not installing Visual Studio on your build server, you are violating the license agreement with Microsoft. Although Microsoft themselves might build without installing Visual Studio on their build servers internally, this scenario is definitely not supported officially.
Building without installing Visual Studio is asking for undefined behavior and jeopardizing the integrity of your builds. I would suggest to stay clear from these attempts until Microsoft officially supports this scenario.
Microsoft strongly recommended not to build without installing Visual Studio when we asked as Gold Partner 2 years back as it was not supported in any way officially and there is no license model covering the scenario.

Doing an Ant Build on Android Studio

Does Android Studio support Ant builds?
I want to run a before-compilation Ant target.
Android Studio is new, so it seems possible it's not supported in favor of Gradle.
[EDIT]
So it seems that Studio isn't meant to fully support Ant builds (see comments)
It worked fine for me until now, but I suppose there are specific configuration were it won't work as well.
InteliJ IDEA 13 EAP has all Studio features and supports Ant.
I would also like to point out that Gradle also support pre-build tasks, so you might want to consider switching to Gradle.
For those who will go will make that choice, you can generate a Gradle buil from your Eclipse project (Note : I haven't tested it, but it should take you less than minutes to try it out and see if it works for your project).
[ORIGINAL REPLY]
Android Studio definitively supports Ant builds. I have been using it on my company's project and it works fine.
But you are right that it strongly recommend Gradle, making it the default compiler for all new project created with Android Studio (but you could actually switch back to Ant).
Finally, as JoeHz pointed out, Android Studio is based on the open source version of IntelliJ, so you can also go download this version (which is currently much more stable than Android Studio).
Android Studio is based on Intellij IDEA which certainly supports Ant. It can also read the Android Studio project file.
If you can deal with the two Android Studio features that currently aren't in the IDEA 13 EAP yet, you can download that and create an Ant Build.
http://blogs.jetbrains.com/idea/2013/05/intellij-idea-13-early-preview-is-out/

Resources