fledware / GodotXUnit

MIT License
32 stars 5 forks source link

Test results show no code line number! #7

Open GeorgeS2019 opened 3 years ago

GeorgeS2019 commented 3 years ago

Ideally, we have reference to the line numbers of the code files and methods!

Suggestion????

SubProjectForUnitTests.xxxTests.xxxMethod2
failed

The given key 'xxx' was not present in the dictionary.
System.Collections.Generic.KeyNotFoundException
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <14219e81f05d40cfb2d156f9ffe09286>:0 
  at SubProjectForUnitTests.xxxTests.xxxMethod1 (System.Collections.Generic.List`1[T] text) [0x0081b] in <6a44f6daf99a4e659762d950cea46cdc>:0 
  at SubProjectForUnitTests.xxxTests.xxxMethod2 () [0x001be] in <6a44f6daf99a4e659762d950cea46cdc>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <14219e81f05d40cfb2d156f9ffe09286>:0
rexfleischer commented 3 years ago

I believe this has to do with how the assemblies are built. I would have to look into what Xunit does because GodotXUnit wouldnt handle the gathering of that information. But GodotXUnit would still have to pass that information along. This has been a pretty big pain point for even me while using it on my projects.

The suggestion for this is to discover where the information is gathered in Xunit, then pass that information along with the test summary events, then make sure to display it in the IDE.