How do I create a deployment package for CodedUI Tests recorded in Visual Studio 2010 beta? - deployment

A few test scenarios have been recorded using CodedUI test template for my web application in Visual Studio 2010 beta. These run from within the Visual Studio successfully without any issues. I was looking for instructions to create a deployment package.

Configure an environment with a "standalone" MSTest
A series of new test tools is being introduced with Visual Studio 2010. Team Agents provides a very small footprint and includes MSTest (it will be installed in a Visual Studio path).
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe
You can copy the contents of your test project(s) bin\ directory to the machine with Team Agents installed and execute MSTest against your test container.
mstest /testcontainer:x:\test-project\automated-tests.dll"

Coded UI tests use namespaces within libraries that are part of Visual Studio e.g. Microsoft.VisualStudio.TestTools.UITesting
This is unlike UI Automation which is part of the core .NET framework e.g.
System.Windows.Automation
Therefore as I understand it you cannot package Coded UI tests to run in an environment that does not have Visual Studio installed.

Related

unreal engine development using vscode without vs2019, 2017

I'm wondering if I can make a C++ project in unreal engine without visual studio 2019, 2017 etc.
Currently I just use vscode. Is it necessary to install visual studio?
You can use visual studio code but you would need some compiler to compile your C++ project. For that the MSVC compiler that visual studio supports is often used. You can download the MSVC compiler and use visual studio code with it. when you create your project with visual studio code will generate a .vscode folder. In this folder you will have a
task.json [ for generating the build scripts you need to compile your program and create the exe files]
Launch.json [ for debugging your C++ classes]
Properties.json [ for finding the MSVC compiler ]
Unreal engine has a button in the editor that will compile your code. This equivalent to running
cd " Where you have your engine installed"
"Engine\\Build\\BatchFiles\\Build.bat" YourProjectNameEditor Win64 Development "C:\ThePathToYourProject\YourProjectName.uproject" -waitmutex
Visual studio provides other build task such as a DebugBuildGame and ShippingBuild
Visual studio code also provides these build task through task.json file, but it does not work out of the box
I ended up making a video about this and timestamped important events
https://youtu.be/fydvKedIxKk
You want to consider fixing the task.json if your want to run any build other than the editor one.

Is NUnit Test tool for windows is removed from NUnit 3.0.1

In old times we used Nunit window test tool.
Right now I am facing some issue with Nunit test adapter & it's not displaying tests in Visual Studio. Unsupported test framework error in NUnit
Now I can find only NUnit Console and no window tool. Any tool available to open NUnit test project out of visual studio for execution & results?
I have installed Nunit 3.0.1 (latest available) on my machine.
There is a new GUI Runner currently under developement - version 0.1 is expected soon. This is the replacement for the GUI you're currently using.
The other option, as Johan said, is to use Visual Studio's built in Test Runner, and install the NUnit3 Test Adapter, either as a Nuget Package, or a Visual Studio Extension.
To run NUnit 3.0 tests in Visual Studio you need to use the NUnit3 Test Adapter.
https://github.com/nunit/nunit3-vs-adapter/wiki

Use Specific Roslyn Compiler Version in TeamCity

Due to a bug in the Roslyn compiler, I cannot build my project using v1.0 of the compiler (there is no workaround to make it work on 1.0). However, Microsoft has corrected the issue in a more recent version of the compiler.
When using Visual Studio, you can use a specific version of the compiler by adding the NuGet package available from https://www.nuget.org/packages/Microsoft.Net.Compilers/ to your project. This causes Visual Studio to use the specified version of the compiler when building the project.
However, when attempting to run a build on TeamCity, it does not seem to know to use the new version of the compiler. It only allows one to choose which version of Visual Studio to use. Is there any way to specify to TeamCity which version of the compiler to use manually?
Note: I am using TeamCity Professional 9.1.3 (build 37176) and in the build step I have chosen Visual Studio 2015.
When built locally, the build is done using:
D:\BitBucket\LocalPackages\Microsoft.Net.Compilers.1.1.0-beta1-20150928-02\build\..\tools\csc.exe /noconfig /nowarn:1701,1702,2008 ....
But when built on TeamCity, the log shows:
[Csc] C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702 .....
I have also confirmed that the package is installed as part of the TeamCity build (prior to the csc command):
[Exec] Installing 'Microsoft.Net.Compilers 1.1.0-beta1-20150928-02'.
Is this just a symptom of how NuGet can behave differently in the Visual Studio UI vs. Command line? And if so, is there a workaround?
Update:
I never did figure it out. Running the build in Visual Studio on the build server worked perfectly, but running the build using the exact same files through TeamCity did not work.
However, Microsoft released VS2015 Update 1, which resolves my original issue, though not this specific problem.
The Microsoft.Net.Compilers package is using the standard Nuget tooling. Specifically, there is a build folder in the package, which contains a props file. This props file gets injected into the csproj file, and is responsible for changing the csc executable to the one in the package.
If you are using msbuild 14, then the .props file is changing the CscToolPath, and the CscToolExe to point to the csc.exe in the package. So you just have to make sure that TeamCity is using msbuild 14.
Which version of TeamCity are you using? The documentation of 9.1 says that it supports msbuild 14 (msbuild 2015). If you are on older version, you could still use msbuild 14 from the command line runner.

Open source file from NUnit's GUI Test Runner

Is there a plugin or configuration option that will open a source file in Visual Studio when the relevant line is clicked in NUnit's GUI test runner? It displays it in NUnit, but that still leaves me searching for the file in Visual Studio to actually fix the error.
You can use http://nunit.org/index.php?p=vsTestAdapter&r=2.6.2
NUnit adapter for integrated test execution under Visual Studio 2012
(all updates),and Visual Studio 2013 (all updates). Compatible with
NUnit 2.0 through 2.6.3.
Download

how to use nunit with visual studio

Visual studio has a built-in unit test framework. I am wondering if I can use nunit instead?
Yes, TestDriven.Net, Nunit and Resharper provide integration with VS. More details in the two posts below (in response to the same question).
Unit test, NUnit or Visual studio?
and
Unit test, NUnit or Visual studio?
Using NUnit without extensions
This answer is long overdue, but I'm using NUnit in Visual Studio without any additional extensions (that are mainly also not free).
The whole idea is to configure your test project (a usual Class library project actually) so that when you hit F5 or Ctrl-F5 it automatically starts NUnit GUI and starts test execution.
The main benefit of this project configuration (all configuration steps are described with images) is that it's easy to also debug your tests if you need to when you have bugs in them.
Here's a free Visual Studio addin for NUnit: NUnitAddin