Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test with RouDi and new API elements #378

Closed
2 tasks
budrus opened this issue Nov 18, 2020 · 10 comments · Fixed by #540
Closed
2 tasks

Integration test with RouDi and new API elements #378

budrus opened this issue Nov 18, 2020 · 10 comments · Fixed by #540
Assignees
Labels
test A module/integration/stress/etc test for a component
Milestone

Comments

@budrus
Copy link
Contributor

budrus commented Nov 18, 2020

Brief feature description

After implementing and testing all the new building blocks and public API classes, a top level integration test where they are used together with the RouDI daemon shall be done

Detailed information

For this the RouDi environment can be used

Collect the things to test here:

  • All public API classes and all there functionlity is verified

  • The management of shared memory resources like ports shall be tested. These resources are created and shall be destroyed when creating/destroying public API objects

@budrus
Copy link
Contributor Author

budrus commented Nov 18, 2020

@elfenpiff @elBoberido is the RouDi environment the way to go, or are there other options in the meantime?

@budrus budrus self-assigned this Nov 18, 2020
@budrus budrus added the test A module/integration/stress/etc test for a component label Nov 18, 2020
@budrus budrus added this to the Prio 1 milestone Nov 18, 2020
@budrus budrus mentioned this issue Nov 18, 2020
13 tasks
@elfenpiff
Copy link
Contributor

@budrus for that scenario I would not use the roudi environment and explore other options like for instance: https://robotframework.org

The reason is an actual bug: In the waitset there was once the semaphore configured as a non inter process semaphore which lead to green tests since they were all started in the same process but as soon as I started an interprocess example nothing worked since the trigger was not send.

And maybe we have even more inter process bugs which we are not aware and they are not showing up when we run everything in one process. You have to keep in mind that the roudi environment does not everything which a normal roudi does.

  • The roudi environment creates and maps the shared memory into the process. In the normal case, the roudi creates the shared memory and maps it and the application opens the shared memory and maps it too, but this makes no sense for the roudi environment (or maybe we can map the same shared memory multiple times into the process space)

  • What about the rights management. Apps are started with specified users/groups to handle their access. This is also not very well testable in the roudi environment.

  • How should we test the termination of apps with the roudi environment. If we would enable termination the only thing the test would do would be to commit Seppuku.

I think the roudi environment is the perfect tool for our classical integration tests but if we would like to have a full blown API/system test we should mock/adjust nothing and work with the real stuff.

@budrus
Copy link
Contributor Author

budrus commented Nov 19, 2020

Sounds like a nice job to explore something new. We should give https://robotframework.org/ a try

@elBoberido
Copy link
Member

elBoberido commented Nov 19, 2020

@budrus yes, the RouDiEnvironment is the easiest way to test the new API. Keep in mind that each thread has its own PoshRuntime.
We should also explore different frameworks for our integration tests, but it's not black and white and there are valid use cases even for the tests you want to do.

@elBoberido
Copy link
Member

@budrus for that scenario I would not use the roudi environment and explore other options like for instance: https://robotframework.org

The reason is an actual bug: In the waitset there was once the semaphore configured as a non inter process semaphore which lead to green tests since they were all started in the same process but as soon as I started an interprocess example nothing worked since the trigger was not send.

In this case we need additional tests. Like the robot framework which automates our examples as tests.

And maybe we have even more inter process bugs which we are not aware and they are not showing up when we run everything in one process. You have to keep in mind that the roudi environment does not everything which a normal roudi does.

* The roudi environment creates and maps the shared memory into the process. In the normal case, the roudi creates the shared memory and maps it and the application opens the shared memory and maps it too, but this makes no sense for the roudi environment (or maybe we can map the same shared memory multiple times into the process space)

There is no problem to do this, since the application do not need to map the shared memory to the same address like roudi.

* What about the rights management. Apps are started with specified users/groups to handle their access. This is also not very well testable in the roudi environment.

Yes, but this is a small part of the tests. No need to use a more complicated framework for tests which are not affected by this.

* How should we test the termination of apps with the roudi environment. If we would enable termination the only thing the test would do would be to commit Seppuku.

I think the roudi environment is the perfect tool for our classical integration tests but if we would like to have a full blown API/system test we should mock/adjust nothing and work with the real stuff.

Agreed

@elfenpiff
Copy link
Contributor

elfenpiff commented Nov 19, 2020

* The roudi environment creates and maps the shared memory into the process. In the normal case, the roudi creates the shared memory and maps it and the application opens the shared memory and maps it too, but this makes no sense for the roudi environment (or maybe we can map the same shared memory multiple times into the process space)

There is no problem to do this, since the application do not need to map the shared memory to the same address like roudi.

@elBoberido I agree with you that there should be no problem. But in the end I would argue only because we do not see any problem here doesn't mean there isn't any. Also what about the future, maybe we creating one when we finalize the shared memory split.

I agree that a simple API test can be performed by the RouDiEnvironment but if we would like to test the public API also in a way that it behaves exactly like it should be in every detail we cannot use the RouDiEnvironment.

Maybe this is something for iceoryx v2.0.

@dkroenke
Copy link
Member

dkroenke commented Dec 2, 2020

The Robot Framework offers the possibility to start/stop processes and examine their results This could be a starting point for it to create integration tests. In this case we could even reuse the existing examples to achieve that. But we need then to extend the examples for covering the full existing API which make the examples more complex.

@budrus
Copy link
Contributor Author

budrus commented Dec 2, 2020

Or have "special examples" that execute one functionality, do a print or whatever is needed for the examination and then do the next thing. What is your feeling @dkroenke using RouDi env or the Robot Framework?

@dkroenke
Copy link
Member

dkroenke commented Dec 8, 2020

My opinion is that the Integrationtests should stick as much as possible to the usecase of the end-user, who doesn't use the RouDi Env. Regarding the Robot-Framework it seems that the support for C/C++ seems to be limited. It can start/stop processes and evaluate the return values but this is not enough for our needs.
Currently I'm evaluating the ROS 2 launch testing which seems more promising. The idea is to have the API tests in a ROS 2 package available which can be easily executed with colcon test.

@mossmaurice mossmaurice removed their assignment Dec 10, 2020
@dkroenke
Copy link
Member

Example from #421 can be taken up as candidate for integrationtesting

dkroenke added a commit to ApexAI/iceoryx that referenced this issue Dec 11, 2020
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Jan 8, 2021
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Jan 8, 2021
Signed-off-by: Dietrich Krönke <[email protected]>
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Jan 19, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
marthtz pushed a commit to boschglobal/iceoryx that referenced this issue May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test A module/integration/stress/etc test for a component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants