You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation: Make clear that beforeeach and aftereach are not called in a child suite #958
I was a little surprised to know that before each from parent suites are not called automatically in child suites. Is there any specific reason for that?
The solution with the reference inside the child suite works in general, but it has an issue that in such case, as far as I can see, the parent procedure is being called inside child suite with rollback settings of the child suite. And it also requires including this reference in each child suite and that in my eyes defeats the whole purpose of parent-child hierarchy a little bit.
As an example, if I have the parent suite where roll back setting is set to manual and the beforeeach procedure is written in a way to use it (I'm doing some system-wide setup and tear down actions which require manual transaction manipulations), and then child suite uses roll back auto, when the parent beforeeach is called from child it generates warnings like "Unable to perform automatic rollback after test context. An implicit or explicit commit/rollback occurred in procedures ...".
I'm not sure if I'm understanding your use-case properly.
Would it be possible to create a simple example that showcases what you want to achieve?
It sounds to me like you are trying to achieve something that's just not possible with the framework, but maybe I'm missing something.
@pesse basically i wanted to use a generic setup routine which makes some transaction actions with commits/rollbacks and have defined it in the separate package with roll back setting set to manual.
But i got around the problem by simply using autonomous transactions so i think you can disregard my comments, all good now :)
Activity
nrogachev commentedon Aug 14, 2019
@pesse Hi.
I was a little surprised to know that before each from parent suites are not called automatically in child suites. Is there any specific reason for that?
The solution with the reference inside the child suite works in general, but it has an issue that in such case, as far as I can see, the parent procedure is being called inside child suite with rollback settings of the child suite. And it also requires including this reference in each child suite and that in my eyes defeats the whole purpose of parent-child hierarchy a little bit.
As an example, if I have the parent suite where roll back setting is set to manual and the beforeeach procedure is written in a way to use it (I'm doing some system-wide setup and tear down actions which require manual transaction manipulations), and then child suite uses roll back auto, when the parent beforeeach is called from child it generates warnings like "Unable to perform automatic rollback after test context. An implicit or explicit commit/rollback occurred in procedures ...".
pesse commentedon Aug 16, 2019
I'm not sure if I'm understanding your use-case properly.
Would it be possible to create a simple example that showcases what you want to achieve?
It sounds to me like you are trying to achieve something that's just not possible with the framework, but maybe I'm missing something.
nrogachev commentedon Sep 3, 2019
@pesse basically i wanted to use a generic setup routine which makes some transaction actions with commits/rollbacks and have defined it in the separate package with roll back setting set to manual.
But i got around the problem by simply using autonomous transactions so i think you can disregard my comments, all good now :)
Clarify behavior of before/after procedures in suitepath