diff --git a/MANIFEST.in b/MANIFEST.in index a5f6677..96ef85f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ include README.md LICENSE -include automation-report/* \ No newline at end of file +include automation_report/* \ No newline at end of file diff --git a/README.md b/README.md index df91159..37dc122 100644 --- a/README.md +++ b/README.md @@ -1 +1,34 @@ -# automation-report \ No newline at end of file +# automation-report + +Python package to generate HTML report of your automation cases and its steps with its valid status. + + +### Installation +``` +$ pip install automation-report +``` + +### Code Example +``` +# Importing package +from automation_report import report + +# Use starttest() method to start a new case with its name given as parameter +report.starttest("CASE 0001: Test the screen") + +# Populate the various steps status with info(), success(), fail() methods for particular case +report.info("Page is opened") +report.success("It works") +report.fail("Well, it didn't worked.") + +# End above started case +report.endtest() + +# Create yet another case as following +report.starttest("CASE 0002: Another case") +report.info("DOnet screen") +report.success("It works") +report.endtest() +# User close method to finally complete whole report generation +report.close() +``` \ No newline at end of file diff --git a/automation-report/report.html b/automation_report/report.html similarity index 100% rename from automation-report/report.html rename to automation_report/report.html diff --git a/automation-report/report.py b/automation_report/report.py similarity index 98% rename from automation-report/report.py rename to automation_report/report.py index 86a823b..21ce431 100644 --- a/automation-report/report.py +++ b/automation_report/report.py @@ -22,7 +22,7 @@ def starttest(case_name): testCasecontent = testCasecontent + tableContent -def endtest(case_name): +def endtest(): global testCasecontent testCasecontent = testCasecontent + "\n \n\n" diff --git a/setup.py b/setup.py index c8eca82..946a023 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,20 @@ from setuptools import setup +# read the contents of your README file +from os import path +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + setup( name = 'automation-report', - packages = ['automation-report'], - version = '0.0.4', + packages = ['automation_report'], + version = '1.0.0', license='MIT', description = 'Simple report for your test automation including various cases/steps specifying its valid status.', author = 'Bibek Adhikari', author_email = 'bbekad94@gmail.com', url = 'https://github.com/bibekad123/automation-report', - download_url = 'https://github.com/bibekad123/automation-report/archive/0.0.4.tar.gz', + download_url = 'https://github.com/bibekad123/automation-report/archive/1.0.0.tar.gz', keywords = ['automation report', 'report', 'automation'], classifiers=[ 'Development Status :: 3 - Alpha', @@ -19,4 +25,6 @@ 'Programming Language :: Python :: 3.7', ], include_package_data=True, + long_description=long_description, + long_description_content_type='text/markdown' ) \ No newline at end of file