It depends on the test framework, if it can run in Edge.js - whether or not
is uses a feature of .NET that's not available to Edge.js (AppDomains is my
suspicion).  I think the Visual Studio one only comes with Visual Studio,
which would be an issue for CI. I know NUnit tests can be invoked from
home-made C#.

But, why use a test framework for .NET at all - when you're already inside
jqUnit?

Each jqUnit test can be a wrapper to call the C# test, and the jqUnit
object can be passed into C# at the start, so you can still do
jqUnit.assert.

Steve


On Tue, Nov 14, 2017 at 8:06 PM, Joseph Scheuhammer <[email protected]>
wrote:

> A related thought.
>
> If edge.js has access to a C# testing framework, for example,
> Microsoft.VisualStudio.TestTools.UnitTesting, then:
> * the unit tests can be written in C#
> * edge.js can be used to call upon them from within nodejs.
>
> In short, C# testing can be run as if it were jqUnit testing.
>
> I'll explore that.
>
> On 2017-11-13 3:52 PM, Joseph Scheuhammer wrote:
> > Hi,
> >
> > I'm working on adding the ability to test C#/.NET code used with edge.js
> > (GPII-2672 [1]).  But, I've started to wonder about whether this should
> > be done or not.  This is a way of thinking out loud and seeing what
> > others have to say.
> >
> > The issue started when some of my ProcessReporter C# code caused
> > exceptions or worse.  Antranig remarked (paraphrase), that the more C#
> > and edge.js we use, the more we need to run unit tests on the C# code
> > itself.  That seems like a pretty obvious and indisputable conclusion.
> >
> > But, it occurred to me that something analogous is happening on the
> > Linux side and we don't test there.
> >
> > The purpose of C# + edge is to get at Windows native OS specific
> > features that are not directly available from nodejs, and to allow
> > calling on them from nodejs + JavaScript.  By comparison, in the case of
> > Linux, we use C++ to build node add-ons to provide the same kind
> > interface between nodejs and Linux native OS features.  We do not unit
> > test the C++ code.
> >
> > But, it's not the case that we do not test anything with respect to the
> > Linux node add-ons.  What we do on Linux is export certain key functions
> > from the C++ code that define the interface between node and the
> > add-on.  Everything behind that on the C++ side of the interface is a
> > black box.  We write unit tests for the exported functions using nodejs
> > and jqUnit.  For example there is a "nodepackagekit_test.js" [2] that
> > tests the C++ interface functions.  But, there are no tests for any of
> > the supporting C++ functions defined within the add-on that are
> > "private" to it.
> >
> > By that logic, we should do the same thing with C# on Windows.  We
> > should just test the interface functions.
> >
> > On the other hand, there is the argument that the more you test, the
> > better you are in terms of finding bugs, detecting regressions, and so
> > on.  This line of thought leads to actual C# testing (and, on Linux, C++
> > testing).
> >
> > Thoughts?
> >
> > [1] https://issues.gpii.net/browse/GPII-2672
> >
> > [2]
> > https://github.com/GPII/linux/blob/master/gpii/node_modules/
> packagekit/nodepackagekit/nodepackagekit_test.js
> >
>
> --
> ;;;;joseph.
>
> 'Call me hobophobic, but I don't think two vagrants should be allowed to
> marry.'
>                                - J. Tiedrich -
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://lists.gpii.net/mailman/listinfo/architecture
>
_______________________________________________
Architecture mailing list
[email protected]
https://lists.gpii.net/mailman/listinfo/architecture

Reply via email to