-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not works... #1
Comments
I rewrite file locations, now works fine. (Ncrunch with testrunner) using SyntaxTree.VisualStudio.Unity.Bridge; [InitializeOnLoad]
} directory may different with user... |
hm.... when i add playmode test, ncrunch build fail. |
Yes, this adapter only support editor mode test. Because editor mode test is unit test, play mode test is integration test. |
The newest version v1.2.0 has fixed this problem. It has changed to using regex to replace string for path inconsistence between Unity versions. |
This should not happen because Unity didn't use project files to run tests and NCrunch use project files only to run tests. |
still not work. nunit refrence not changing. sometimes change, sometimes not. can't find reason. i tried absolute folder location, still not changing. on/off unity, remove solution/remade, not works too. |
Could you make a minimized project which could reproduce this problem and send to me? |
The core code is very simple, I think you could debug it yourself. |
@raveneer Have you solved this problem? |
yes now works. but when I make a new project, sometimes swap not happens. then I compile several times until fix. (but it's random) |
Could you output content every time when swap not happens, and check what caused the problem? |
hello. i'm very excited your work.
but sadly not works for me...
open unity 2017.1.2f1 / NCrunch 3.11.0.9 / VS2017
add edit mode test. test runner > pass
install adapter from asset store
close unity
open unity. open testcode with vs (by unity editor)
NCrunch throw casting error.
solutions reference not changed. (still C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll)
i add small debug line
ProjectFilesGenerator.ProjectFileGeneration += (string name, string content) =>
{
Debug.Log("change done!");
return content.Replace(NUnitUnityReference, NUnitOfficialReference);
};
9. close unity. open unity.
10. i can see "change done!" twice.
11. open testcode.
12. still same. not works (like .6)
NCrunch error line
An error occurred while analysing this project after it was built: System.Reflection.TargetInvocationException: 호출 대상이 예외를 Throw했습니다. ---> System.InvalidCastException: 'nCrunch.Module.NUnit3.Integration.NUnit3CallbackProxy' 형식 개체를 'System.Web.UI.ICallbackEventHandler' 형식으로 캐스팅할 수 없습니다.
위치: NUnit.Framework.Api.FrameworkController.LoadTestsAction..ctor(FrameworkController controller, Object handler)
--- 내부 예외 스택 추적의 끝 ---
위치: System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
위치: System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
위치: System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
위치: System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
위치: System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
위치: nCrunch.Module.NUnit3.Integration.FrameworkController.LoadTests(INUnit3CallbackHandler handler)
위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor.b__7_0()
위치: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
위치: nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackActivity(String name, Action activity)
위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor.prepareFramework(DynamicProxy[] dynamicProxies)
위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor..ctor(ReflectedAssembly assembly, IList
1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, DynamicProxy[] dynamicProxies) 위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkRuntimeEnvironment.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList
1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)위치: nCrunch.TestExecution.TestFinder.�.�()
위치: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
위치: nCrunch.TestExecution.TestFinder.�.�()
위치: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
위치: nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
위치: nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)
plus : when i change Nunit dll from
Files\Unity\Editor\Data\UnityExtensions\Unity\TestRunner\net35\unity-custom\nunit.framework.dll
to your asset's Nunit dll,
'NCrunch works fine, but Unity TestRunner fail'
in this case, can't test monobehaviors. not helpful :(
The text was updated successfully, but these errors were encountered: