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

[Question]What is the best way to access Fitnesse testsuite results from docker container? #1286

Open
pb1981 opened this issue May 13, 2020 · 4 comments

Comments

@pb1981
Copy link

pb1981 commented May 13, 2020

Summary of the Query:

Want to figure out the best way to access Fitnesse testsuite results from outside when results are lying inside docker container?

I have these approaches in hand

  1. Mounting a docker container volume in the host PC where docker container is running but I was not successful as Java.io exceptions where getting thrown. While trying this test ensured that mounted volume has same read write access wrt same user/group but still the attempt was not successful and container kept on exiting every few seconds.

  2. Fitnesse dockerised or not, exposes rest services. So the result xml files can be viewed in this URL:
    http://testserver ip:port/files/testResults/FitNesse.TestSuiteName and we have to parse the xml file content from REST GET call response to get the final count.

or
3) Web Scrap below URL to get Results Summary.
http://serverip:port/FitNesse.TestSuiteName?responder=overview

@woodybrood
Copy link
Collaborator

Can you tell us more about your container setup? What all is in the container. Is both fitnesse and the SUT in the container? Is FitNesse running as the wiki and being executed from outside the container? Or is it being run as a command in the container? Where is the FitNesseRoot where your tests exist? How is it updated?

@pb1981
Copy link
Author

pb1981 commented May 13, 2020

@woodybrood The container has the TestCases and TestResult xml files stored there. The root is like :/opt/fitnesse/FitNesseRoot/FitNesse
The Test Suite are executed by using URL like below:
http://TestserverIP:port/FitNesse.TestSuiteName?responder=suite&remote_debug=true

The SUT and Runner is outside Container .

Problem is that we can't directly read the result xml residing inside container, doing "docker cp source destination" of result files to outside path every time after the suite is executed is not a good solution I think

@fhoeben
Copy link
Collaborator

fhoeben commented May 14, 2020

Do I understand correctly that your FitNesse container is 'long-lived', i.e. you want to start it once and use it for multiple runs? Do you start the runs via a browser?

I've used dockerized FitNesse only to run tests from a CI environment where I started a new container each 'build/run' based on test definitions in version control, run the tests, copy the results and then dispose of the container. This way each run is completely fresh, no side-effects from previous runs, and there is no need to keep a container running when there is no test.

In this approach I used FitNesse jUnit runner and did copy the generated XML (surefire format) and HTML test reports after each run. This worked both with mounted volumes and docker cp, but the 'cp' approach gave less permission hassle so I preferred that.

@pb1981
Copy link
Author

pb1981 commented May 18, 2020

Yes @fhoeben , fitnesse docker container will be long lived and also it will be used for multiple runs after it's started. I am running Test Suite through browser only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants