Run all test in project using xUnit and TestDriven.net - testdriven.net

I know that very similar question was posted some time ago and it was even marked as answered, however the solution there does not seem to work for me.
I've installed xUnit using NuGetto my test project, wrote some tests and then decided I would like to run them somehow. I've turned my head towards TestDriven.Net which looked pretty good, so I installed it.
After that I've installed xUnit support for TD.NET using xUnit's installer. Everything went fine and installer marked TD.NET support as successfully installed. Yet, when I try to run all of my tests it fails (or rather do not find any tests in my test project, it displays that 0 success, 0 failures and 0 skipped tests were run).
Seems to me that TestDriven.Net is handling xUnit just fine (
"1 passed, 0 failed, 0 skipped, took 1,75 seconds (xUnit.net 1.9.1 build 1600).", which I suppose means that it recognized xUnit tests).
I read about registry modifications, but everything seems fine there. Also, TestDriven.net author says that xunit.dll.tdnet should be enough for runner to recognize unit tests. This file is present in package folder created by NuGet but is not copied into bin folder. Should it stay where NuGet put it or should I place it somewhere else?
I would love to have it up and running so any help would be appreciated.
Cheers, Pako

Like I noted above in comments to my question - the issue was not connected directly to TestDriven.Net and xUnit. It just seems that TestDriven.Net does not work properly with Solution Navigator from Productivity Power Tools extension to VS2010.
Simply running my tests form good ol' Solution Explorer works like a charm.

Related

UWP: Access violation happens only in release mode

I am new to UWP. I have just ported a quite complicated WPF app. It took me several weeks to figure out every difference and refactored a lot of code. However when I start to build and run in release mode I get an Access violation exception.
How is this even possible? Aren't debug and release execution supposed to be the same? How can I debug this problem if it occurs only in release?
If I turn native compilation off, the release build runs without a problem. However, when I try to install it on the device, a NetCore 2.2 debug framework is required. What is this debug framework and why cannot I run my release code without it?
I used to develop for AspNetCore and those things can run even on Linux. I really do not understand how is a UWP app cannot run on a Windows 10 tablet without a special debug framework.
I am kind of lost here. Any help or guidance is much appreciated. Thanks
EDIT:
As for the conclusion: I needed to create the app again from scratch. I started copying everything from the old app class by class. It was worth the effort not just because I refactored a lot of code :) but finally found what was causing the crash. I had a dependency in one of my libraries to an older version of System.ServiceModel.Primitives NuGet package. In Debug build, even with Native Compilation, the runtime managed to resolve the package. However, in Release it could not.
It was quite a journey that made me to develop a better software. However I could avoid it by releasing more often from the beginning, or the if the runtime would show more informative error messages about assembly resolution problems.
The .NET Native compilation tends to cause problems for apps and it is recommended to try and run the application frequently in the release mode to catch potential issues as soon as possible. Usually any reflection-related code should be checked well, as those usually are the source of problems.
I would suggest going back in time (if you have some kind of source control) and try earlier builds of your app to pinpoint the time when the app stopped working. Alternatively, you can try commenting out parts of the code until the release build starts working. Finally, it is also possible to create a blank project and sequentially copy code and run it to locate the problem.
.NET Native is an annoying aspect of UWP app development and Microsoft is aware of this - the plan is .NET Native will no longer be required anymore soon (most likely before .NET 5 comes) and later there will be a more predictable replacement.

What can cause robot framework to stop working?

Having used robot framework for almost a year, it suddenly stopped working. Starting a script gives only the response
'pybot' is not recognized as an internal or external command, operable program or batch file.
Running scripts worked yesterday, and I can't remember making any changes since then. I have checked the environment variables, they haven't been changed. The installation is on a Windows Server 2012. Python is still working as usual. There is no difference between using pybot or robot.
Now I just don't know what else to look for, and I'm asking you geniuses to give some ideas on where to search for this error.
One of two things happened:
robot framework was uninstalled
something in your environment changed so that pybot is no longer on your PATH
Both of those should be very easy to verify.
It turns out that the python/scripts folder had been moved by someone into the python/Lib folder. Simply putting it back solved the issue.

Meteor compile errors

I checked out 86a52e6 on the master branch from the Meteor repo. Ran ./scripts/generate-dev-bundle.sh per the Slow Start (for developers) instructions. This goes off to work for awhile, generating a ton of output but ending with errors. All of them seem to be unused private fields in third-party libraries.
Has anyone seen anything like this? Any guidance would be most welcome! I've been getting to know my way around Meteor via the pre-compiled binaries, but this was my first attempt to build from scratch.
Running OSX 10.8.5.
Thanks in advance!
You don't need to compile your own dev_bundle. On first time you run meteor from the checkout, it will download compiled binaries (mongod, mongo, node and npm) for your system architecture.
Don't bother yourself compiling, just use ready binaries.

How do I debug MSBuild Error MSB6006 from TeamCity?

So the scenario is that I'm trying to setup TeamCity to check out our ASP.NET solution from an SVN repository and compile it using a Release profile. The checkout from SVN works fine, however compiling the asp.net solution is where things start to fall apart.
The first issue is that TeamCity seems almost bizarrely inconsistent when it comes to compiling. For instance, the first time it checks out the solution and compiles it, everything seems to work fine. However, if I force it to build after that then it gives:
error MSB6006: "aspnet_compiler.exe" exited with code 1.
and fails.
I noticed that this only seemed to be happening on one of the projects in the solution. When I removed the project everything appeared to work fine. Since the above error is no help at all, I resorted to removing parts of the solution until I found the part that (seemingly) was causing the issue.
Initially I was confident that I had identified the problem and so I cleaned everything up and tried to replicate the process from the start. I checked out a clean version and removed the 'problem pages' from the solution straight away. It didn't compile. So I'm scratching my head. It compiled before - why not now?
Anyway by this stage I've burnt a significant amount of time trying to get this up and running. Since the project that it was complaining about was non-critical I just removed the whole thing. So Team City was once again happily building the remaining projects. I leave it alone and move onto the next thing.
I come in the next day and do a force build - and it isn't compiling anymore. It's giving the same error as above but on a different project now!!!
So I'm pulling my hair out trying to work out what's going on here. My questions are:
Why does something that compiles fine in Visual Studio have so many problems in Team City?
Why is the error given by MSBUILD so vague that it's practically useless (and is there any way to get something more useful)?
Why does the solution build fine in Team City one day and not the next?

Qt program does not run and exits immediately when run on another computer

I want to deploy my QT program and I can't find the reason it doesn't work, maybe you guys can help me ?
I work with visual studio 2010, windows 7, QT 5.0.2.
I have tested my deployment tree on my own computer and it works fine.
When deploying my application I ship every necessary dll that I am aware of. Depends.exe does not complain. I also deployed the plugin I know of, and since it still did not work I moved my entire plugin folder in the exe folder.
When I execute it on any other computer than my development computer, the program exits instantaneously with no message whatsoever.
Any idea where I should look now ?
How can I debug that kind of issue ?
Did you try deploying the debug version of the program and then starting it from the command line. The debug version will output more information to the console which could help you resolve the issue.
You will have to also deploy the debug versions of the MS c-runtime libraries.
Deploying the debug version is not a permanent solution, so you should not adopt that as normal routine for distributing your software. I am just suggesting that you try running the debug version one time on that particular machine until you figure out the issue. Then remove the installed program and install the release version again.
You can run your application using QtCreator:
Debug > Start Debugging > Start and Debug External Application...
This can give you more information about what's going on.

Resources