Comments (9)
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.
Unfortunately no.
It was a experiment that i gave up.
from devices.xunit.
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.
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.
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.
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.
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.
@Planverlust Please try the latest NuGet, 0.99.6-beta5 as they should have these issues resolved.
from devices.xunit.
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)
- Help with how to use ResultChannel HOT 1
- .txt file not inserted into project on install HOT 1
- iOS 13 can't run test project
- Accessibility problems on Windows Runner
- Testing UWP app fails to start HOT 1
- VS runner does not resolve on netstandard2.0 targets. HOT 2
- Failed MemberData doesn't show in runner app HOT 1
- Visual Studio for Mac
- Extremely poor performance, tests do not complete
- Is Devices.XUnit still be maintained?
- DotNet Maui HOT 1
- Support net6.0+ iOS/Android projects HOT 1
- UWP test runners do not work on Visual Studio 2022 HOT 2
- How do I view/display test results?
- Ability to filter tests HOT 1
- UnitTests from UWP command line
- Device runner for macOS? HOT 6
- Wrong version of xunit.runner.utility.netstandard installed with the latest package version HOT 1
- Test Automation HOT 4
- Templates out of date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devices.xunit.