Jenkins build XCode project + run unit test - jenkins

I been struggling for awhile following every single article, blog post etc that I can find.
I need to setup Jenkins to build my XCode 4.5.2 project and run the unit test... I got the build part working but not the unit test part...
I first tried the Xcode Plugin and then all the different other options to run it from the command line with xcodebuild etc which all fail...
Xcode 4.5.2
Mac OS Lion
Jenkins CI
can anyone give me reference to something that can help me?
Thanks

I've seen a lot of people complaining that XCode 4.5 broke command line unit test execution. Here is one reference post with a possible workaround solution:
Xcode 4.5 command line unit testing

Facebook built a tool that might be helpful: https://github.com/facebook/xctool
If that does not work for you you will have to wait until Apple builds better tools for unit testing and continuous integration.

Related

Build iOS .ipa from Ionic 4 project inside Bitbucket pipeline

I have an Ionic v4 project in bitbucket, I created a pipeline to build Android APK from the project using Docker and the basic .apk building steps.
Now I have to do the same thing for iOS. I don't think Docker will be a good option since it can't really run a Mac image.
My question here is: Are there services, libraries or something else that I can use to build the .ipa on the pipeline? Preferably free with the least cost, has anyone made such things and has examples here to help me get it off the ground?
I've been looking at Microsoft App Center and CircleCI, for example, but both seem to have a cost and A LOT of capabilities that really aren't necessary in this project...
Thanks in advance!

Visual Studio 2019 Test Explorer puts all tests under "Not Run Tests"

I have a ASP.Net Core 3 project with Visual Studio Professional 19.4.1 with xUnit 2.4.0. I have a couple of tests written there. My problem is that Visual Studio shows all the tests in this project always under "Not Run Tests". The same tests run well with command line (dotnet test) or another computer.
Repairing/Reinstalling Visual Studio did not help.
Any help is much needed!
UPDATE: I also realized that extension DotNet Extensions for Test Explorer is not present on this computer. This is present on other computer where these work. The problem, however, is how and where to get this extension from?
I already have xunit.runner.visualstudio 2.4.0 included in the project.
Any help is much valuable!!!
Upgrade the nuget package Microsoft.NET.Test.Sdk to version 16.4.0 (or newer).
When creating a new xunit project in vs2019, the version of Microsoft.NET.Test.Sdk installed is 16.2.0, which xunit.runner.visualstudio (v2.4.0 or newer) doesn't seem to work in.
Okay, got the same error where it simply did not run any of my tests despite obviously knowing about them (visible in test explorer in Test > Test Explorer). When I pressed Run or Run all tests, it just categorized them all as "not run". To fix this I lowered my .Net Core Target framework from 3.1 to 3.0 and that fixed it for me after a clean, rebuild of the unit test project.
This error may occur if you have cloned from a repository that used a different framework.
Installing both xunit.runner.visualstudio and xunit.runner.console worked for me.

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.

Unable to find SpecRun.exe when using SpecFlow 1.9 and SpecRun 1.1

Just downloaded the latest SpecFlow 1.9 from NuGet into the BookStore demo.
The scenarios run fine - everything passes.
When I install SpecRun 1.1 from NuGet and run the scenarios, SpecFlow gives me a dialog box that states: "Unable to find SpecRun.exe."
I have removed MSTest runner from app.config.
I have verified that SpecRun.exe is in:
\BookShop\packages\SpecRun.Runner.1.1.0\tools
It compiles fine, the site still runs fine - just not SpecFlow using SpecRun.
Am i missing a config step?
Thanks.
You probably need to upgrade both the NuGet-package and the VS IDE integration; http://www.specflow.org/specflownew/WhatsNew19.html.
Worked for me at least :)
I believe the problem is with the removal of MSTest. I had the same error ("Unable to find SpecRun.exe"), and in my case it was because the Test runner tool in my project settings was not set to MSTest.
I faced the similar problem.
Try to install SpecFlow 1.9.2 extension via Tools->Extension Manager...

Resources