mstest - /resultsfile doesnt work when /testsettings switch is used - mstest

I need to specify the location of the MSTest log file. I was doing this just fine with /resultfile:path but we needed the global timout, etc from the .settings file so i added the /testsettings:testfile.testsettings switch. Now that ive done that, MSTest no longer creates the log.
Any ideas? Ive tried specifying /resultfile switch after /testsettings

Related

How do I disable the test-out folder

Would like to disable the test-out folder means test outputs in my project as it less disk space issues in automation machines. Tried all below options as got it our tool:
SetDefaultListener(false);
setVerbose(0);
command line argument -usedefaultListener false
nothing can work me.I am using maven build tool to generate the jar. We need to give the jar to automachines to run this.
That's not possible by definition if do not want to have that folders, you have to skip tests in process of Jar building.

Use custom Visual Studio run configuration with Docker

I'm in the process of setting up a .NET Core project with Docker in Visual Studio 2017. I've created the project and added the docker-compose to the solution, and everything works.
But somehow, the VS won't build and run Docker with any configurations, other than Debug and Release.
I've created solution and project configurations named Preproduction and selected it, as well as created a docker-compose.vs.preproduction.yml file.
But when I run the preproduction configuration, the project runs as if Release was selected instead. The Build Output console also shows the following:
Debug
*docker-compose -f "docker-compose.yml" -f "docker-compose.override.yml" -f "docker-compose.vs.debug.yml" -p dockercompose3979710767*
Release
*docker-compose -f "docker-compose.yml" -f "docker-compose.override.yml" -f "docker-compose.vs.release.yml" -p dockercompose3979710767*
Preproduction
*docker-compose -f "docker-compose.yml" -f "docker-compose.override.yml" -f "docker-compose.vs.release.yml" -p dockercompose3979710767*
Notice the second yml file.
Somehow it uses the release file, and not the custom configuration file I've added.
Does anyone have any idea how to solve this, so docker will use my custom configurations?
Unfortunately it is not possible. After spending a lot of time to figure it out, it turned out that those two filenames are hardcoded into a DLL. Everything which is not 'DEBUG' will use the 'RELEASE' files.
Using different docker-compose.yml files by referencing them from different folder could be a solution, but since it is not a standard project but a Docker project, you don't have access to the post build events to copy the required files there. Furthermore you cannot have multiple Dockerfile, because it is also based on name convention.
You can use one version to develop and test, defined in the included files and create a script which builds everything manually based on your existing compose files and your extra.
I provide some non-standard solution for this issue can be solved. Here we go:
1) Get dnSPY tool (https://github.com/0xd4d/dnSpy/releases)
2) Install it
3) Find file Microsoft.Docker.dll (For me it was in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\tools" way.)
4) Get copy of this file (copy in some directory for example).
5) Open this dll in dnSpy.exe
6)Go Microsoft.Docker (version number) -> Microsoft.Docker.dll -> DockerComposeClient class -> MergedDockerComposeDocumentProvider private class -> GetDocuments private method
7) In this method you can see all file pathes and files used for build
8) RightClick on necessary string -> Edit IL Instructions
9) Edit what you need (as for me I was able to change docker-compose.override.yml to docker-compose.development.yml)
10) Save change
11) File -> Save Module and saving your upgraded DLL.
WHOILA!!! Actually
you must restart VS and maybe docker. After this your changes will be apply to pipeline build. Enjoy

BDD Tests are not recognized in command level

I am trying to run Specflow BDD tets in command line and looks like it doesn't recognized those tests. But I am able to run them in VS IDE
Not sure whether there is a path issue.
I tried other options as in the below link as well. No luck though
How do you run SpecFlow scenarios from the command line using MSTest
The Problem was, that the code-behind files of the feature files were not generated properly, because the configuration of the unitTestProvider was missing.
See the documentation for that here: http://www.specflow.org/documentation/Configuration/

IntelliJ keeps changing my modules folder settings, I want it to be Test

I have a regular maven module setup like:
src/main/java/...
src/main/test/com/example/...
So I have a junit test etc. inside my test folder, but for some reason after a while the folder setting reverts back to the default and then I can't run my tests using the right-click run test option.
I have to go back into the module settings and change it back to test.
This doesn't happen with my other maven modules (its a multi-module project).
What could the reason be?
I'm using version 12.1.4 ultimate.
I can confirm that this works fine for me on Intellij 12.0.4, 12.1.5 and 13.x (all Ultimate versions).
When I mark a folder (src/main/test in my experiment) it stays marked as a 'Test Source Root' after a restart.
(It's possibly a typo but) the directory structure you mentioned does not adhere to the maven Standard Directory Layout. If you move src/main/test/java/com/example to src/test/java/com/example (notice that there is a java in there, so test/java/com instead of test/com) you wouldn't have to explicitly mark the test folder.

Change build label for Project Cruisecontrol.net

After some unexpected changes on the Cruisecontrol.net buildserver the artifacts directories were gone, and the build labels were reset on all projects. How can I change the build label value on the projects? We are using CCNetLabel variable in our scripts.
I tried updating the .state file with no success. it just overwrites the values on the next build. Also tried manipulating the latest log file in the artifact directory
You can use the <initialBuildLabel> value to set it in your .config file. This documentation for the Default Labeler gives more detail, but here is their example:
<labeller type="defaultlabeller">
<initialBuildLabel>1</initialBuildLabel>
<prefix>Foo-1-</prefix>
<incrementOnFailure>true</incrementOnFailure>
<labelFormat>00000</labelFormat>
</labeller>
I think this is what I did in my build config when I needed to do this, but have since removed it once it got going at the number I wanted.

Resources