Regression tests ?

Asked by Jérôme Duriez

Hello,

I would like maybe to write a regression test (about script who ends to crash while it did not use to). It seems we have some but I could not find precise instructions/examples about them. Neither in yade-dev mailing list, here on launchpad, in sphinx, or in the wiki...

Where could I find some things about that ?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi,
you are right, there are no instructions about that.

You can have a look at [1] or [2] and add your test there.
But there is a difference between regression tests and "check" tests.

If you script has analytical solution, you can definitely add it to
regression tests.
If not - check tests are what you want [3]

[1] http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/py/tests/engines.py
[2] http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/py/tests/wrapper.py
[3] http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/scripts/test/checks/README

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Ok, thank you.

First of all I only want to define a test that would detect revisions that let crash scripts who worked before. I speak of "Segmentation fault". Can I consider this as a check test ?

Revision history for this message
Anton Gladky (gladky-anton) said :
#3

I think, in your case it is better to start your script in debug-mode
and find the reason of crash.
But for future automatic checks by buildbot, you can add your
simplified script to check section and it will be checked
automatically after each commit.
If something goes wrong, you (and others) will be notified about that,

Anton

On Thu, Apr 14, 2011 at 2:32 PM, jduriez
<email address hidden> wrote:
> Question #152793 on Yade changed:
> https://answers.launchpad.net/yade/+question/152793
>
> jduriez posted a new comment:
> Ok, thank you.
>
> First of all I only want to define a test that would detect revisions
> that let crash scripts who worked before. I speak of "Segmentation
> fault". Can I consider this as a check test ?
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

Yes, debugging this crash will be the first step ! But it is not the first time it happens, that's why I decided now to consider such check tests. Thanks

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

Good point. We need to add a section about that in sphinx. Mostly some
copy/paste of checkTest/README and some previous email.
I'll do that when I have more time.

Revision history for this message
Yade Guide (yade-guide) said :
#6

Hey there! As an automated bot, I've taken a look at your question and found some related threads that might interest you. Feel free to explore these topics further by clicking on the links provided below.

Title: "Testing the implémentation of a new contact law"
V. seeks an efficient method for testing C++ code related to implementing a contact law in Yade without running a simulation. Jan suggests defining a physical law as an external C++ library independent of Yade and testing it with simple simulations or independently. Bruno agrees, recommending creating a Yade class with Python wrappers for testing purposes.
https://answers.launchpad.net/yade/+question/690655

Title: "Debugging output"
Klaus was having trouble debugging in Yade with debug options and LOG-statements. Vaclav suggested checking logging settings on https://www.yade-dem.org/sphinx/prog.html#logging for further reference. Klaus can declare a variable in his class to inspect it using the Inspector, and set Attr::noSave flag of that attribute to avoid saving it if necessary. For run-time debugging, he can use kdevelop as a gdb GUI for line by line execution and checking values.
https://answers.launchpad.net/yade/+question/137026

Title: "Finding Scripts"
Seti is having trouble finding specific scripts in YADE documentation like 'biaxialSmooth.py', 'retainingSmooth.py', and 'undrained.py'. Anton provided a link to the examples directory on GitHub, which helped resolve Seti's question.
https://answers.launchpad.net/yade/+question/292180