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

Tutorial for beginners #8

Closed
Tset-Noitamotua opened this issue Jun 12, 2017 · 7 comments
Closed

Tutorial for beginners #8

Tset-Noitamotua opened this issue Jun 12, 2017 · 7 comments
Assignees

Comments

@Tset-Noitamotua
Copy link

I would like to try ReportPortal with Robot-Framework and Python unittests/pytest.

In order to better understand things I would like to make a tutorial about that. But I am kind of lost and don't know where to start :-/. So please give me some guidance and I will publish a tutorial in a Github repo or Gist.

So far I have a Ubuntu 16.04 with Docker up and running as a VirtubalBox VM on a Windows host machine. Inside that VM I have ReportPortal running by following the installation steps from your README and your docs. I can access ReportPortal UI inside VM at http://localhost:8080. Further I have cloned Robotframework repository which has a great set of over 1500 Python unittests and over 4000 acceptance test in Robot-Framework format. I want to use this tests as example for the integration with ReportPortal.

What I have in short:

  • Ubuntu VM with ReportPortal started with docker-compose up
  • set of Python unittests
  • set of RobotFramework tests

What are the next steps I have to work on to see the results of above mentioned tests after execution inside ReportPortal?

@frizzby
Copy link
Collaborator

frizzby commented Jun 16, 2017

Hi @Tset-Noitamotua,
I'm ready to provide some assistance to you. I'm going to replicate your steps now.
Will get back to you soon with more details.

@frizzby
Copy link
Collaborator

frizzby commented Jun 25, 2017

  1. The command to execute RobotFramework acceptance tests with Report Portal looks like this
    atest/run.py python --listener robotframework_reportportal.listener --variable RP_UUID:"your_uuid" --variable RP_ENDPOINT:"https://endpoint" --variable RP_LAUNCH:”ROBOT” --variable RP_PROJECT:"your_project_name" atest/robot/
    But likely you will see a few errors Importing listener 'robotframework_reportportal.listener' failed: ImportError: cannot import name FinishExecutionRQ #10 Trim name field to 256 chars max (server limit) #12 Encode utf8 strings. Fixes errors when non-ascii chars are used. #11.

  2. Regarding RobotFramework UnitTests. I afraid it will not work in this case since RobotFramework unit tests are implemented with python's unittest, but in order to work with ReportPortal unit tests should be executed with pytest.

@Tset-Noitamotua
Copy link
Author

Tset-Noitamotua commented Jun 26, 2017

Great! Thanks a lot! I will play with that today.

Pytest claims to be able to deal with Python's regular unittests (more details here). So it might be possible to run Robot's unit test with pytest with some tweaking. I'll see what I can find out.

@Tset-Noitamotua
Copy link
Author

Tset-Noitamotua commented Jun 26, 2017

Results from first test run

A) without ReportPortal

> atest/run.py python atest/robot/
...
Run suite 'Robot' with 4470 tests in 7 minutes 23 seconds 202 milliseconds.

FAILED
4470 critical tests, 4322 passed, 148 failed
4470 tests total, 4322 passed, 148 failed

B) with ReportPortal

> atest/run.py python --listener robotframework_reportportal.listener --variable RP_UUID:"XXX" \
--variable RP_ENDPOINT:"http://0.0.0.0:8080" \
--variable RP_LAUNCH:"ROBOT FRAMEWORK" \
--variable RP_PROJECT:"ROBOT_INTEGRATION" atest/robot/
...
Run suite 'Robot' with 4470 tests in 14 minutes 28 seconds 791 milliseconds.

FAILED
4470 critical tests, 4322 passed, 148 failed
4470 tests total, 4322 passed, 148 failed

@frizzby Did you have similar results?

It's notable that test execution with ReportPortal integration takes twice as much time as without it.

Approx. 15 minutes after test launch ReportPortal still shows the test running. Why? What needs to be done to finish test launch correctly?

@Tset-Noitamotua
Copy link
Author

Tset-Noitamotua commented Jun 29, 2017

Regarding RobotFramework UnitTests. I afraid it will not work in this case since RobotFramework unit tests are implemented with python's unittest, but in order to work with ReportPortal unit tests should be executed with pytest.

@frizzby just run Robot's unittests with pytest :))))

follow up ...
@frizzby I was able to run Robot's unittests with pytest

image

@DzmitryHumianiuk
Copy link
Member

@Tset-Noitamotua @frizzby
Folks, can we have smthn like Tutorial from it?

@HardNorth
Copy link
Member

Not related to the Agent itself

@HardNorth HardNorth closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants