<div dir="ltr">Mostly, I'd like to test adder/remover methods for children, fields, fieldValues, connect, and meta.  These are the low hanging fruit right now.   I suggest we use some variation of xmldiff.js for comparing nodes and node children...maybe statements too.  Probably the tests would leave the scene graph in the same shape it was before the test.  Just thinking out loud.  Also suggest we create assertEquals() which may just compare XML strings.  It looks like we can add many more asserts as is found in x3d.py<div><br></div><div>Lots of stuff we can discuss.   Probably a lot has already been discussed years ago before I got seriously involved in X3D.</div><div><br></div><div>We'll also need to discover which properties start with uppercase instead of lowercase for es6.  Is there any guidance from the standard on JavaScript/JSON property name casing?  I know that es6 may require first letter uppercase in some cases, but at this time, I am unsure why...type comparison?</div><div><br></div><div>Firstly though, I'd like to create some roundtrip tests for XML generation from JavaScript.  That is, XML -> Serializer/Stylesheet -> JSON -> XML DOM Document -> ES6 structure -> XML.   If we had a way to convert XML to ES6 in a single step (Jeff?), the roundtrip test would be easier.  I have one serializer which takes a DOM document and produces JSON.  Is XML to ES6 warranted?  Should we do it in JavaScript (SAX parser? DOM2ES6Serializer.js?), Python or XSLT?</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 31, 2020 at 5:46 PM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">John, thanks for the good thinking here.<br>
<br>
Creation of unit tests for full code coverage is always worthwhile.<br>
<br>
As a way to integrate this with how we currently do business, have taken the following approach with X3DJSAIL (Java), X3DPSAIL (Python) and X3D Ontology (Turtle).<br>
<br>
a. Conversion of .x3d scene into respective source code (.java .py and .ttl) for loading.  This checks most syntax and expressive correctness.<br>
b. Addition of simple self-validation test, a scene tests itself that the values and relationships are all valid.  This checks most accessor methods (getters/setters).<br>
c. Regression testing reporting these results for all models in X3D Example Archives is produced automatically as part of each build release.<br>
<br>
So we could add further autogenerated tests the mix, but we should figure out "what itch we are scratching" since a lot is in place already.<br>
<br>
Of note is that the Web3DUX User Experience is looking at how user navigation and interaction can be measured.  Theoretically each X3DOM/X_ITE conversion of an .x3d scene might be used with a selenium test harness to check scene capabilities from within an HTML page.  How such tests might define metrics and success criteria are open questions that might become very interesting as we integrate further with the Web.<br>
<br>
<br>
On 8/30/2020 8:44 PM, John Carlson wrote:<br>
> <br>
> Don, et al: would it be reasonable to take X3dToJava.xslt and extend it to produce/generate full code coverage tests for X3DJSAIL?  Would you be interested in such an effort? We can use X3DUOM and X3DJSAIL generation code as well.<br>
> <br>
> Let me know where you might see this fitting into your schedule, if at all.  I'd like to lay down some patterns which can be used in python, es6 and C/C#/C++ as well.<br>
> <br>
> So we're not only validating the apps/scenes, but also validating the whole X3DJSAIL library including getters and removers, not just testing adders, setters and constructors.<br>
> <br>
> Let me know if anyone wants to join the effort.<br>
> <br>
> Thanks,<br>
> <br>
> John<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div>