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

result.markdown #796

Open
bbgw opened this issue Apr 17, 2022 · 1 comment
Open

result.markdown #796

bbgw opened this issue Apr 17, 2022 · 1 comment

Comments

@bbgw
Copy link

bbgw commented Apr 17, 2022

Phenomena

result.markdown didn't produce expected table in PDF report.

Actual Result

report.pdf

(My interest is in the Markdown session, as in the screenshot below. There is no message shown in the Markdown section. .)
Screen Shot 2022-04-17 at 21 04 26

Expect Result

An example is here:
expect result

Details

The result was from the example test_plan_basic.py with an attempt to try out result.markdown in PDF output.

One modification is that I added
pdf_style=StyleArg.DETAILED.value on L202-L208:

@test_plan(
    name="Basic Assertions Example",
    stdout_style=Style(
        passing=StyleEnum.ASSERTION_DETAIL, failing=StyleEnum.ASSERTION_DETAIL
    ),
    pdf_style=StyleArg.DETAILED.value
)
def main(plan):
...

I wonder if it's an environment issue. But could you shed some light on what might go wrong?

Environment

Python

Python 3.9.6

testplan

$ pip show testplan
Name: testplan
Version: 21.9.29
Summary: Testplan testing framework
Home-page: https://github.com/morganstanley/testplan
Author: 
Author-email: [email protected]
License: UNKNOWN
Location: /Users/zhaok16/.pyenv/versions/3.9.6/lib/python3.9/site-packages
Requires: boltons, cheroot, colorama, cycler, flask, flask-restx, lxml, marshmallow, matplotlib, numpy, pandas, Pillow, plotly, psutil, 
py, pyparsing, pytest, python-dateutil, pytz, pyzmq, reportlab, requests, rpyc, schema, scipy,low, plotly, psutil, py, pyparsing, 
pytest, python-dateutil, pytz, pyzmq, reportlab, requests, rpyc, schema, scipy, s setuptools, sphinx, sphinx-rtd-theme, termcolor,
terminaltables, validators, werkzeug
Required-by: 
@kn-ms
Copy link
Contributor

kn-ms commented Apr 20, 2022

Hello Kang,

Thx for reporting this. The problem is not with your environment. Unfortunately none of the markdown based assertions (log_code/log_html) can be rendered to the pdf yet. This is a feature on our list for a while, though no one asked for it yet, so did not get prioritized. Rendering any kind of html/markdown into the pdf looks to be nontrivial. I count this issue as feature request, so we will see if we can put it into the roadmap any time soon.

Anyone reading this if you know any technology, I missed, that can render markdown/html with Reportlab feel free to post it here, it might speed this piece of work up.

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

2 participants