Giter Site home page Giter Site logo

Comments (9)

goodlaff avatar goodlaff commented on August 16, 2024

I am having exactly the same problem after following the same steps.
The runner is working fine for Android project in same solution.

xunit.2.0.0-beta4-build2738
xunit.runner.xamarin.0.99.3-beta4-build1017

=== Xamarin Studio ===
Version 5.5.3 (build 6)
Runtime:
Mono 3.10.0 ((detached/e204655)
GTK+ 2.24.23 (Raleigh theme)
=== Apple Developer Tools ===
Xcode 6.1 (6604)
Build 6A1052d
=== Xamarin.iOS ===
Version: 8.4.0.16 (Business Edition)
=== Operating System ===
Mac OS X 10.10.0

@Planverlust - did you find a solution?

from devices.xunit.

Planverlust avatar Planverlust commented on August 16, 2024

Unfortunately no.
It was a experiment that i gave up.

from devices.xunit.

goodlaff avatar goodlaff commented on August 16, 2024

For anyone interested I've hopefully solved this problem.

In the appdelegate.cs example you must uncomment line 37:
// We need this to ensure the execution assembly is part of the app bundle
runner.AddExecutionAssembly(typeof(ExtensibilityPointFactory).Assembly);

And explicitly install the unit.runner.utility package:
Install-Package xunit.runner.utility -Pre

These two changes ensure that these two assemblies are bundled in with the compiled app, otherwise the linker will optimise them away as they are not directly referenced in the code.

I have created a fork with these changes in it and will add a pull request:
https://github.com/goodlaff/xamarin.xunit

from devices.xunit.

clairernovotny avatar clairernovotny commented on August 16, 2024

Hi,

You're right, for iOS/Android we need to have a code reference to the execution library to ensure it gets pulled into the package. Looks like beta 4's template missed that part... :/

Can you please try the new beta 5? It refactored the entry point to hide a lot more, so please be sure to update the AppDelegate/MainActivity with the new ones from the templates.

Thanks!

from devices.xunit.

goodlaff avatar goodlaff commented on August 16, 2024

Hi @onovotny,

Thanks for looking at this and getting back to me.

I added the latest packages from nuget and tested them out.

The problems with iOS seem to have been fixed and I was able to remove the xunit.runner.utilty package from the project.

However, the android package is now missing the xunit.runner.utilty dll so I had to add the package explicitly to the project to be able to compile and run. After changing the MainActivity to match the new syntax I was able to run tests as before, however the AutoStart and TerminateAfterExecution facilities no longer seem to work, or at least setting the properties to true has no effect.

Cheers

Keith

from devices.xunit.

clairernovotny avatar clairernovotny commented on August 16, 2024

The xunit.runner.utility is bundled with the Xamarin runner NuGet and included via a props file as content, so it shouldn't need to be referenced separately. I had this working, but I'll dig in again to see what's going on. There's a lot of MSBuild voodoo in the various xUnit packages to get test discovery/execution working properly in VS and the runners, so something might have slipped through.

As for AutoStart and AutoTerminate, that was an oversight as code was moving to use Xam Forms (to eliminate duplicate UI elements). It's fixed in 6b3cb6a and I'll have that out very soon -- I just want to look into the runner.utility isuse you saw in android first.

from devices.xunit.

goodlaff avatar goodlaff commented on August 16, 2024

No problem, I look forward to the next release, apart from these couple of issues it's all working as expected.

Great job!

from devices.xunit.

clairernovotny avatar clairernovotny commented on August 16, 2024

@Planverlust Please try the latest NuGet, 0.99.6-beta5 as they should have these issues resolved.

from devices.xunit.

Planverlust avatar Planverlust commented on August 16, 2024

Sorry for the late answer. Tried the latest version and it works perfectly! I am happy that i can continue my adventures in xUnit now! Can't stand NUnit any more ;-)

from devices.xunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.