algorithmic modeling for Rhino
Are any plugin developers automating testing for grasshopper plugins in visual studio? I am ready try just about anything to eliminate manually testing.
Along similar lines, I am starting to experiment with using slider animation or a timer to run automated tests of plugins and scripts. This seems doable to me, has anyone already explored this?
Tags:
Hi Walter
I've had some NUnit tests for some time on some parts of Weaverbird. To simplify setup, I just did it for parts that did not use RhinoCommon, but it should also be possible with it.
Using Grasshopper as a testing suite would also be nice. Maybe I'd use some Python scripts for that, as it is slightly easier to keep the test going, even after changing some minor types. Up to you, really, as any language will likely be good for that.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Here's the file. Should change the colour of the group based on it's input value.
Hi Arend,
That is an interesting idea.
So the workflow would be to set up those groups and leave them in the file so you would have a visual pass/fail indicator as you are working? That would certainly be useful, but different than what I was thinking about.
I want to run through a big set of possible user inputs on a script and capture the results without having to sit there and watch it. I have attached a really simple example of doing this by animating inputs with a slider and recording the results to csv file. This method actually works fine, just a little clunky having to reset the recorders.
I made some small improvements to this so it is a single click tester. I replaced the slider animation with Giulio's Trampoline code (thanks Giulio!) and made a record component that would reset automatically each time.
decided to go ahead and build the plugin as I was imagining it. Attached is the gha and a demo file.
There is a testing driver component that steps through multiple sets of inputs and outputs the results at the end to a csv. You an add as many inputs to control as you want to the component and it will create corresponding outputs. If the sets on input have different lengths, it will use the shortest.
There is a sensor component that captures results throughout the file. you have a single driver in each file but as many sensors as you like.
This has not been tested at all yet so will certainly have some issues, but would love some feedback if anyone wants to try it out. The components are called Lemmings
I had not used NUnit.
Just starting to set up some test sets and try it out, seems great so far, thanks for the tip!
I have added the components you suggested. Here is an update of the plugin and a demo script. Let me know if I captured your suggestion correctly...
Hi, i'm trying to use Lemmings. SO, I downloaded the gha file to the library folder. But, when I want to use the component the Run Button doesn't show up!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by