{"id":22388433,"url":"https://github.com/eger-geger/nunit-html-report","last_synced_at":"2025-07-31T06:32:53.364Z","repository":{"id":32932747,"uuid":"36528651","full_name":"eger-geger/nunit-html-report","owner":"eger-geger","description":"Generates HTML reports from NUnit3 test results","archived":false,"fork":false,"pushed_at":"2018-07-04T15:21:38.000Z","size":4769,"stargazers_count":1,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-01T21:45:41.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eger-geger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-29T20:56:37.000Z","updated_at":"2018-07-04T15:21:39.000Z","dependencies_parsed_at":"2022-06-27T03:09:54.382Z","dependency_job_id":null,"html_url":"https://github.com/eger-geger/nunit-html-report","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eger-geger%2Fnunit-html-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eger-geger%2Fnunit-html-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eger-geger%2Fnunit-html-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eger-geger%2Fnunit-html-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eger-geger","download_url":"https://codeload.github.com/eger-geger/nunit-html-report/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228219657,"owners_count":17887058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T02:13:56.657Z","updated_at":"2024-12-05T02:13:57.429Z","avatar_url":"https://github.com/eger-geger.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nure (NUnit Report)\n\nHTML report generator for NUnit3. Basicaly it takes nunit 3 TestResult.xlm file as input and produces human readable TestResult.html as an ouput. Following command will do that:\n\n```\n\u003e path\\to\\nure.exe path\\to\\TestResult.xml -o path\\to\\output\\folder\n```\nReport generator is available at Nuget as [Nure](https://www.nuget.org/packages/nure/). It is being insalled as solution level package.\n\n## Screenhots\n\nIn addition to infomration contained in NUnit test result file report can include images and event log. Images can be anything with \"\\*.jpeg\", \"\\*.jpg\" or \"\\*.png\" extensions. Files are being associated with tests based on test ID (*NUnit.Framework.TestContext.CurrentContext.Test.ID*): if file name contains test ID in st's name it belongs to given test. In order to generate report with images run followig command:\n\n```\n\u003e path\\to\\nure.exe path\\to\\TestResult.xml -o path\\to\\output\\folder -a path\\to\\attachments\\folder\n```\n\n## Event Log\n\nEvent log are hierarchical list of events (actions). \"Hierarchical\" means that top-level events can have children which may have children on they own. In order to appear in report events need to be captured to *NUnitReporter.EventReport.IEventReport* and save with *NUnitReporter.EventReport.IEventStorage*:\n\n```C#\n//creating disk based storage using current nunit working directory\nIEventStorage eventStorage = new DiskStorage(TestContext.CurrentContext.WorkDirectory);\n\nIEventReportFactory reportFactory = new EventReportFactory();\n\n//for every NUnit3 test factory will return separate report instance\nIEventReport report = reportFactory.CurrentTestReport;\n\n//id is reqired in order to finalize a complex action later on\nString actionId = report.RecordActivityStarted(\"Search with Goole\", \"NUnit\");\nreport.RecordEvent(\"Navigate to URL\", \"http://www.google.com\");\nreport.RecordEvent(\"Enter search phrase\", \"NUnit\");\nreport.RecordEvent(\"Click search button\");\nreport.RecordActivityFinished(actionId);\n\n//save report on disk\neventStorage.Save(TestContext.CurrentContext.Test.ID, report);\n```\n\nEvent log is associated with a particular test based on test ID. In order to generate report containing event log use *-a* option to set path to folder used to save reports during test. If you want to have both images and event log be part of the same report place them into the same folder.\n\nYou can start capturing event by installing [Nure.EventReport](https://www.nuget.org/packages/Nure.EventReport/) Nuget package.\n\n## Proxy Factory\n\nWhile adding report entry by hand is relatively easy using it at scale can become cumbersome. *NUnitReporter.EventReport.ProxyFactory.ReportingProxyFactory* solves this by creating self-reporting proxies. It uses (Castle Dymamic Proxy)[http://www.castleproject.org/projects/dynamicproxy/] under the hood to create dynamic proxies. Dues to it's limatations mehods and properties need to be virtual in order to be recorded. Usage example:\n\n```C#\nIEventReportFactory reportFactory = new EventReportFactory();\n\nvar proxyFactory = new ReportingProxyFactory(reportFactory);\n\nvar reportingProxy = proxyFactory.Create\u003cSomeObject\u003e(constructorArg1, constructorArg2);\nreportingProxy.DoStuff();\nreportingProxy.DoOtherStuff();\n```\n\nProxy object produced by *ReportingProxyFactory* will record every method and property (setting only) usage to event report. The way specific methd appears in the report can be customized with *NUnitReporter.EventReport.ProxyFactory.EventReportAttribute* placed on property or method. Currently it allows ignoring specific method or property.\n\nIn order to use in your project install [Nure.EventReport.ProxyFactory](https://www.nuget.org/packages/Nure.EventReport.ProxyFactory/) Nuget package. It requires [Nure.EventReport](https://www.nuget.org/packages/Nure.EventReport/) to be installed as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feger-geger%2Fnunit-html-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feger-geger%2Fnunit-html-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feger-geger%2Fnunit-html-report/lists"}