TeamCity NUnitTestRunner crashes with Mono 5.4.1 - mono

I was wondering why my NUnit tests were suddenly terminating successfully after 30 seconds whereas they usually take at least 20 minutes. Then I looked into the build log and found that after upgrading the mono version on our build agent to v 5.4.1, the test runner crashed with exit code 134.
After doing some research, I found out the following:
- The test runner works when using mono 4.8.1 (which we have installed, too), but the test code won't compile with it
- Ì also tried launching th erunner manually like so: /Library/Frameworks/Mono.framework/Versions/5.4.1/bin/mono -v /Applications/TeamCity/buildAgent/plugins/dotnetPlugin/bin/JetBrains.BuildServer.NUnitLauncher.exe which gave me the following error: [1] 3461 abort /Library/Frameworks/Mono.framework/Versions/5.4.1/bin/mono -v with the 3461changing every time I retry.
- According to this thread, exit code 134 means that the program crashed.
Due to the error output, I am not sure, whether it's the TeamCity test runner that crashes, mono that crashes or TeamCity that makes mono crash.
Any help appreciated :)

I finally figured it out myself. Apparently, Mono 5.4.1 lacks important NUnit2 components that were shipped with Mono 5.2 and older. To make tests work again, I had to add the NUnit.Console NuGet-package (not NUnit.ConsoleRunner as it lacks required extensions) and update the TeamCity build step to use the nunit3-console as described here.

For others that may come across this, I fixed this by changing the NUnit build steps from NUNit 2.6.3 to the NUnit 3.10. I didn't change any of my code / packages, just the TC configuration.

Related

webRTC compilation windows 7 64 bit

I am trying to compile the webRTC code but I get the following error.
I am not trying with Visual Studio.
The error got is <PATH>/src/buildtools/win/gn.exe cannot start because of incompatibility of 64 bit windows version. The confusion is I am compiling on Windows 7 64 bit. The error is confusing to say the least.
Steps followed are :-
Unzipping the depot_tools from the chromium webpage and setting up the correct path.
Then for downloading the webRTC and compilation the steps were
mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync
gn gen out/Default < The problem arises here >
We would need the entire trace of all the python script to give you a full answer, but it is VERY likely that you need to have MSVC 2015 (14) installed and to set the corresponding environment variable DEPOT_TOOLS_WIN_TOOLCHAIN=0. The scripts will otherwise stop working with cryptic error messages, even before the compilation. It fits your "symptoms".
See this for more answers (chromium and webrtc build instructions are shared):
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
If you copy paste the trace form the python scripts here, I might be able to help you more.

How can I run a Xamarin.UITest from the commandline?

I would like to run tests (made using Xamarin.UITest) on my build server, which runs TeamCity on OS X.
I have searched online on how to do this, but I am only able to find how these tests can be submitted to Xamarin Test Cloud. This is not what I want, I want to run the tests I wrote directly on devices (and/or simulators) connected to the build server.
according to the docs (requires NUnit 2.6.3)
$ mono <path-to>/Nunit-2.6.3/bin/nunit-console.exe <path/to/uitest-assembly.dll>
Here is what I do on OS-X:
Locally install the correct nunit-console.exe version
Build the app
Build the uitests
Run the tests
Example:
nuget install NUnit.Runners -Version 2.6.4
xbuild iOS/UITestFromCmdLine.iOS.csproj /target:Build
xbuild UITests/UITestFromCmdLine.UITests.csproj
mono ./NUnit.Runners.2.6.4/tools/nunit-console.exe UITests/bin/Debug/UITestFromCmdLine.UITests.dll

Tests are not executed - Bot Issue: Test target MyTests encountered an error (Test session exited(0) without checking in

I'm using Xcode Continuous Integration for making builds.
OS X Server 4.1,
Mac OS X 10.10.4,
Xcode 6.3.1
My all test cases start failing after OS X update OS X 10.10.4 (Build 14E17e) and Xcode 6.3.2. I'm not sure whether these update cause the issue or something else.
Error: Bot Issue: error. Uncategorized. Issue: Test target MyTests encountered an error (Test session exited(0) without checking in
Any idea what is the cause of the issue?
Observation:
I ran test cases using xctool all the test cases are passing however when I ran test cases in release mode, they are failing.
My issue is resolved. I don't know the exact reason however I changed sign-in '-' to Don't SignIn in build setting of all tests targets and I found one crash while running test cases in released mode. My issue is resolved after fixing these two issues.

Failing python 3.3 build in travis ci. Bug on the linux box/python installation?

I have a python 3.3 job failing on travis python 3.3 worker. Here is the link to the failing job:
https://travis-ci.org/rags/pynt/jobs/5482408
I believe this could be a problem with the worker for following reasons:
The build passes on my box (really!) with python 3.3
The travis build on 3.2 is passing
The error seems to be in the python 3.3 built-in library code. /usr/lib/python3.3/argparse.py:2028
Here are the relevant python 3.3 sources
https://github.com/certik/python-3.3/blob/master/Lib/argparse.py
https://github.com/certik/python-3.3/blob/master/Lib/gettext.py
There is a possibility that my code is doing something funny, but I cant seem to debug it.
Any pointers, suggestion will help
Thank you
Update:
This is a bug in travis. It has been accepted as one and a corresponding ticket has been raised. Hopefully, it will get fixed soon.

Debugging Unit Tests in MonoDevelop 3

I'm getting an exception:
Null Ref > Stack Trace (System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke( {yadda yadda} )
when I try to debug unit tests in MonoDevelop. I'm running MonoDevelop 3.0.3.2 on Lubuntu installed from the standard repo. I have referenced the mono versions of nunit (I'm not sure why there are standard and mono versions either?).
I have been able to debug unit tests using older versions on MonoDevelop. Example solution here: http://dl.dropbox.com/u/30149716/DebugUnitTest.zip
I have downloaded the above and successfully debugged in VS (having change the unit refs of course)
================ EDIT ================
I filed a bug report: https://bugzilla.xamarin.com/show_bug.cgi?id=8442