{"id":15017420,"url":"https://github.com/reportportal/agent-js-jasmine","last_synced_at":"2026-03-06T21:31:27.527Z","repository":{"id":19454634,"uuid":"87074363","full_name":"reportportal/agent-js-jasmine","owner":"reportportal","description":"Agent to integrate Jasmine with ReportPortal.","archived":false,"fork":false,"pushed_at":"2024-10-04T15:32:44.000Z","size":2101,"stargazers_count":8,"open_issues_count":2,"forks_count":15,"subscribers_count":20,"default_branch":"develop","last_synced_at":"2025-10-25T04:12:52.547Z","etag":null,"topics":["jasmine","javascript","js","reportportal"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@reportportal/agent-js-jasmine","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reportportal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-03T12:59:33.000Z","updated_at":"2024-10-04T12:40:28.000Z","dependencies_parsed_at":"2023-01-13T20:22:46.066Z","dependency_job_id":"a7a3e45a-1bdf-4bb5-b62e-abdc18882163","html_url":"https://github.com/reportportal/agent-js-jasmine","commit_stats":{"total_commits":149,"total_committers":25,"mean_commits":5.96,"dds":0.7315436241610738,"last_synced_commit":"b92515b093848c2c1be48d3b97dee9bd1b011219"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/reportportal/agent-js-jasmine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-js-jasmine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-js-jasmine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-js-jasmine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-js-jasmine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reportportal","download_url":"https://codeload.github.com/reportportal/agent-js-jasmine/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-js-jasmine/sbom","scorecard":{"id":771474,"data":{"date":"2025-08-11","repo":{"name":"github.com/reportportal/agent-js-jasmine","commit":"352eaa8f6f80d9b624e0feba810db99cb880acfa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/CI-pipeline.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-pipeline.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/CI-pipeline.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI-pipeline.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/CI-pipeline.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:145: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:156: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/reportportal/agent-js-jasmine/release.yml/develop?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/CI-pipeline.yml:44","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:32","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   1 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:37"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'","Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T02:22:25.556Z","repository_id":19454634,"created_at":"2025-08-23T02:22:25.556Z","updated_at":"2025-08-23T02:22:25.556Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30198661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["jasmine","javascript","js","reportportal"],"created_at":"2024-09-24T19:50:26.166Z","updated_at":"2026-03-06T21:31:27.486Z","avatar_url":"https://github.com/reportportal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @reportportal/agent-js-jasmine\n\nAgent to integrate Jasmine with ReportPortal.\n* More about [Jasmine](https://jasmine.github.io/)\n* More about [ReportPortal](https://reportportal.io/)\n\n## Installation\n\nInstall the agent in your project:\n```cmd\nnpm install --save-dev @reportportal/agent-js-jasmine\n```\n\n## Configuration\n\n**1.** Create the `reportportalConf.js` file with ReportPortal configuration:\n```javascript\nmodule.exports = {\n  apiKey: \"\u003cAPI_KEY\u003e\",\n  endpoint: \"http://your.reportportal.server/api/v1\",\n  project: 'Your reportportal project name',\n  launch: 'Your launch name',\n  attributes: [\n      {\n          \"key\": \"YourKey\",\n          \"value\": \"YourValue\"\n      },\n      {\n          \"value\": \"YourValue\"\n      },\n  ],\n  description: 'Your launch description',\n};\n```\n\nThe full list of available options presented below.\n\n| Option                | Necessity  | Default   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n|-----------------------|------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| apiKey                | Required   |           | User's ReportPortal token from which you want to send requests. It can be found on the profile page of this user.                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| endpoint              | Required   |           | URL of your server. For example 'https://server:8080/api/v1'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| launch                | Required   |           | Name of launch at creation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| project               | Required   |           | The name of the project in which the launches will be created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| attributes            | Optional   | []        | Launch attributes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| description           | Optional   | ''        | Launch description.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| rerun                 | Optional   | false     | Enable [rerun](https://reportportal.io/docs/developers-guides/RerunDevelopersGuide/)                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| rerunOf               | Optional   | Not set   | UUID of launch you want to rerun. If not specified, ReportPortal will update the latest launch with the same name                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| mode                  | Optional   | 'DEFAULT' | Results will be submitted to Launches page \u003cbr/\u003e *'DEBUG'* - Results will be submitted to Debug page.                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| skippedIssue          | Optional   | true      | ReportPortal provides feature to mark skipped tests as not 'To Investigate'. \u003cbr/\u003e Option could be equal boolean values: \u003cbr/\u003e *true* - skipped tests considered as issues and will be marked as 'To Investigate' on ReportPortal. \u003cbr/\u003e *false* - skipped tests will not be marked as 'To Investigate' on application.                                                                                                                                                                                                                          |\n| debug                 | Optional   | false     | This flag allows seeing the logs of the client-javascript. Useful for debugging.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| restClientConfig      | Optional   | Not set   | `axios` like http client [config](https://github.com/axios/axios#request-config). May contain `agent` property for configure [http(s)](https://nodejs.org/api/https.html#https_https_request_url_options_callback) client, and other client options e.g. `proxy`, [`timeout`](https://github.com/reportportal/client-javascript#timeout-30000ms-on-axios-requests). For debugging and displaying logs the `debug: true` option can be used. \u003cbr/\u003e Visit [client-javascript](https://github.com/reportportal/client-javascript) for more details. |\n| headers               | Optional   | {}        | The object with custom headers for internal http client.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| launchUuidPrint       | Optional   | false     | Whether to print the current launch UUID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| launchUuidPrintOutput | Optional   | 'STDOUT'  | Launch UUID printing output. Possible values: 'STDOUT', 'STDERR', 'FILE', 'ENVIRONMENT'. Works only if `launchUuidPrint` set to `true`. File format: `rp-launch-uuid-${launch_uuid}.tmp`. Env variable: `RP_LAUNCH_UUID`, note that the env variable is only available in the reporter process (it cannot be obtained from tests).                                                                                                                                                                                                               |\n| attachPicturesToLogs  | Optional   | false     | If set to 'true' then attempts will be made to attach screenshots to the logs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| reportHooks           | Optional   | false     | Determines report before and after hooks or not.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| token                 | Deprecated | Not set   | Use `apiKey` instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n\n**2.** Create the agent and add the reporter it to the Jasmine:\n```javascript\nconst ReportportalAgent = require('@reportportal/agent-js-jasmine');\nconst reportportalConfig = require('./reportportalConf');\n\nconst agent = new ReportportalAgent(reportportalConfig);\n\njasmine.addReporter(agent.getJasmineReporter());\n```\n\n**3.** After the Jasmine completes its work, wait for the agent to finish:\n```javascript\nagent.getExitPromise().then(() =\u003e {\n    console.log('finish work');\n})\n```\n\n## Reporting\n\nThe agent provides an API to extend the functionality of Jasmine.\n\nAdd `PublicReportingAPI` into your test file to use additional reporting features.\n\n```javascript\nconst PublicReportingAPI = require('@reportportal/agent-js-jasmine/lib/publicReportingAPI');\n```\n\n### Report static attributes, description\n\nInside your suite or spec call `PublicReportingAPI.setDescription()`, `PublicReportingAPI.addAttributes()`\n\n**setDescription** method inside your **suite**\n\nParameter | Required | Description | Examples\n--------- | ----------- | ----------- | -----------\ndescription | true | \"string\" - text description for your suite | \"Your description\"\nsuite | true | \"string\" - description of your suite (all suite descriptions must be unique) | \"Suite\"\n\n**addAttributes** method inside your **suite**\n\nParameter | Required | Description | Examples\n--------- | ----------- | ----------- | -----------\nattributes | true | attributes, pairs of key and value | [{ \"key\": \"YourKey\", \"value\": \"YourValue\" }]\nsuite | true | \"string\" - description of your suite (all suite descriptions must be unique) | \"Suite\"\n\n**setDescription** method inside your **spec**\n\nParameter | Required | Description | Examples\n--------- | ----------- | ----------- | -----------\ndescription | true | \"string\" - text description for your suite | \"Your description\"\n\n**addAttributes** method inside your **spec**\n\nParameter | Required | Description | Examples\n--------- | ----------- | ----------- | -----------\nattributes | true | attributes, pairs of key and value | [{ \"key\": \"YourKey\", \"value\": \"YourValue\" }]\n\nTo integrate report with Sauce Labs just add attributes:\n\n```javascript\n[{\n \"key\": \"SLID\",\n \"value\": \"# of the job in Sauce Labs\"\n}, {\n \"key\": \"SLDC\",\n \"value\": \"EU (EU or US)\"\n}]\n```\n\n### Report logs and attachments\n`PublicReportingAPI` provides the following methods for reporting logs into the current suite/spec.\n\n* log(*level*, *message* , *file*, *suite*). Reports *message* and optional *file* with specified log *level* as a log of the current suite/spec.\u003cbr/\u003e\n\n*level* should be equal to one of the following values: *TRACE*, *DEBUG*, *INFO*, *WARN*, *ERROR*, *FATAL*.\u003cbr/\u003e\n*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC*** \u003cbr/\u003e\n*file* should be an object (***REQUIRED INSIDE YOUR SUITE,*** if there is no file object, set ***NULL***) : \u003cbr/\u003e\n```javascript\n{\n  name: \"filename\",\n  type: \"image/png\",  // media type\n  content: data,  // file content represented as 64base string\n}\n```\n* trace (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with trace log level.\n* debug (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with debug log level.\n* info (*message* , *file*, *suite*). Reports *message* and optional *file* as log of the current suite/spec with info log level.\n* warn (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with warning log level.\n* error (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with error log level.\n* fatal (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with fatal log level.\n\n`PublicReportingAPI` provides the corresponding methods for reporting logs into the launch.\n* launchLog (*level*, *message* , *file*). Reports *message* and optional *file* with the specified log *level* as a log of the current launch.\n* launchTrace (*message* , *file*). Reports *message* and optional *file* as a log of the launch with trace log level.\n* launchDebug (*message* , *file*). Reports *message* and optional *file* as a log of the launch with debug log level.\n* launchInfo (*message* , *file*). Reports *message* and optional *file* as log of the launch with info log level.\n* launchWarn (*message* , *file*). Reports *message* and optional *file* as a log of the launch with warning log level.\n* launchError (*message* , *file*). Reports *message* and optional *file* as a log of the launch with error log level.\n* launchFatal (*message* , *file*). Reports *message* and optional *file* as a log of the launch with fatal log level.\n\n### Finish launch/suite/spec with status\n`PublicReportingAPI` provides the following methods for setting status into the current suite/spec.\n\n* setStatus(*status*, *suite*). Assign *status* to the current suite/spec.\u003cbr/\u003e\n\n*status* should be equal to one of the following values: *passed*, *failed*, *stopped*, *skipped*, *interrupted*, *cancelled*, *info*, *warn*.\u003cbr/\u003e\n*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC*** \u003cbr/\u003e\n\n* setStatusPassed(). Assign *passed* status to the current suite/spec.\n* setStatusFailed(). Assign *failed* status to the current suite/spec.\n* setStatusSkipped(). Assign *skipped* status to the current suite/spec.\n* setStatusStopped(). Assign *stopped* status to the current suite/spec.\n* setStatusInterrupted(). Assign *interrupted* status to the current suite/spec.\n* setStatusCancelled(). Assign *cancelled* status to the current suite/spec.\n* setStatusInfo(). Assign *info* status to the current suite/spec.\n* setStatusWarn(). Assign *warn* status to the current suite/spec.\n\n`PublicReportingAPI` provides the corresponding methods for setting status into the launch.\n* setLaunchStatus(*status*). Assign *status* to the launch.\u003cbr/\u003e\n*status* should be equal to one of the following values: *passed*, *failed*, *stopped*, *skipped*, *interrupted*, *cancelled*, *info*, *warn*.\u003cbr/\u003e\n\n* setLaunchStatusPassed(). Assign *passed* status to the launch.\n* setLaunchStatusFailed(). Assign *failed* status to the launch.\n* setLaunchStatusSkipped(). Assign *skipped* status to the launch.\n* setLaunchStatusStopped(). Assign *stopped* status to the launch.\n* setLaunchStatusInterrupted(). Assign *interrupted* status to the launch.\n* setLaunchStatusCancelled(). Assign *cancelled* status to the launch.\n* setLaunchStatusInfo(). Assign *info* status to the launch.\n* setLaunchStatusWarn(). Assign *warn* status to the launch.\n\n### Report test case id for steps and suites\n\n**setTestCaseId(*testCaseId*, *suite*)**. Set test case id to the current suite/spec. Should be called inside of corresponding suite or spec.\u003c/br\u003e\n\n*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC*** \u003cbr/\u003e\n\n**Example:**\n```javascript\nconst PublicReportingAPI = require('@reportportal/agent-js-jasmine/lib/publicReportingAPI');\n\ndescribe('A suite', function() {\n    const suiteAttachment = {\n      name: 'attachment.png',\n      type: 'image/png',\n      content: data.toString('base64'),\n    }\n    PublicReportingAPI.addAttributes([{\n        key: 'suiteKey',\n        value: 'suiteValue',\n    }], 'A suite');\n    PublicReportingAPI.setDescription('Suite description', 'A suite');\n    PublicReportingAPI.debug('Debug log message for suite \"suite\"', null, 'A suite');\n    PublicReportingAPI.info('Info log message for suite \"suite\"', suiteAttachment, 'A suite');\n    PublicReportingAPI.warn('Warning for suite \"suite\"', null, 'A suite');\n    PublicReportingAPI.error('Error log message for suite \"suite\"', null, 'A suite');\n    PublicReportingAPI.fatal('Fatal log message for suite \"suite\"', suiteAttachment, 'A suite');\n    PublicReportingAPI.setLaunchStatusPassed();\n    PublicReportingAPI.setStatusPassed('A suite');\n    PublicReportingAPI.setTestCaseId('TestCaseIdForSuite', 'A suite');\n\n    it('spec', function() {\n        const specAttachment = {\n          name: 'attachment.png',\n          type: 'image/png',\n          content: data.toString('base64'),\n        }\n        PublicReportingAPI.addAttributes([{\n            key: 'specKey',\n            value: 'specValue'\n        }]);\n        PublicReportingAPI.setDescription('Spec description');\n        PublicReportingAPI.log('INFO', 'Info log message for spec \"spec\" with attachment', specAttachment);\n        PublicReportingAPI.launchLog('ERROR', 'Error log message for current launch with attachment', specAttachment);\n        PublicReportingAPI.trace('Trace log message for spec \"spec\"', specAttachment);\n        PublicReportingAPI.debug('Debug log message for spec \"spec\"');\n        PublicReportingAPI.info('Info log message for spec \"spec\" with attachment');\n        PublicReportingAPI.warn('Warning for spec \"spec\"');\n        PublicReportingAPI.error('Error log message for spec \"spec\"');\n        PublicReportingAPI.fatal('Fatal log message for spec \"spec\"');\n        PublicReportingAPI.setStatusPassed();\n        PublicReportingAPI.setTestCaseId('TestCaseIdForSpec');\n\n        expect(true).toBe(true);\n    });\n});\n```\n\n## Integrations\n\n### Protractor integration\n\n#### Launch agent in single thread mode.\n\nIf you launch protractor in single tread mode, just add agent initialization to the `onPrepare` function.\nAdd `agent.getJasmineReporter` to the  `jasmine.getEnv().addReporter()` as an argument. You can see this in the example bellow.\nUpdate your configuration file as follows:\n```javascript\nconst ReportportalAgent = require('@reportportal/agent-js-jasmine');\n\n...\nconst agent = new ReportportalAgent({\n        token: \"00000000-0000-0000-0000-000000000000\",\n        endpoint: \"http://your.reportportal.server/api/v1\",\n        launch: \"LAUNCH_NAME\",\n        project: \"PROJECT_NAME\",\n        attachPicturesToLogs: false,\n        attributes: [\n            {\n                \"key\": \"YourKey\",\n                \"value\": \"YourValue\"\n            },\n            {\n                \"value\": \"YourValue\"\n            },\n        ]\n    });\nexports.config = {\n    ...\n    onPrepare: ()=\u003e {\n        ...\n        jasmine.getEnv().addReporter(agent.getJasmineReporter());\n    },\n    afterLaunch:() =\u003e {\n        return agent.getExitPromise();\n    }\n};\n```\n\n#### Launch agents in multi thread mode.\n\nFor launching agents in multi thread mode firstly parent launch must be created and it ID\nmust be sent to the child launches , so they would send data to the right place, and wouldn't create new\nlaunch instances at the Report Portal.\n\nThe main problem is that node.js is a single threaded platform. And for providing multi treading launch with browsers protractor generate\nnew processes  of node, which can't interact with each other, so Singelton objects or functions can't be created for synchronizing\nit work. Only primitive types could be sent as args to the new processes before launch. The way of resolving this problem is\nto create launch file that would generate a Parent Launch and send launch's ID to protractor as argument. Then protractor would\nlaunch jasmine-agents with parent ID.\nLook through example of the Launch File with protractor-flake module at the 'Settings fot the multi threaded launch' section or at the examples folder.\nAny node runner could be used!\n\n1. Install 'protractor-flake':\n```cmd\nnpm install protractor-flake --save-dev\n```\n\n2. Create a config file as in example below:\n\n`reportportalConf.js`\n```javascript\nmodule.exports = {\n    token: \"00000000-0000-0000-0000-000000000000\",\n    endpoint: \"http://your.reportportal.server/api/v1\",\n    launch: \"LAUNCH_NAME\",\n    project: \"PROJECT_NAME\",\n    attachPicturesToLogs: false,\n    attributes: [\n        {\n            \"key\": \"YourKey\",\n            \"value\": \"YourValue\"\n        },\n        {\n            \"value\": \"YourValue\"\n        },\n    ]\n}\n```\n\n3. Create a main launch file as in example below:\n\n`protractorLaunchFile.js`\n```javascript\nconst protractorFlake = require('protractor-flake');\nconst AgentJasmine = require('@reportportal/agent-js-jasmine');\nconst reportportalConfig = require('./reportportalConf');\nconst agent = new AgentJasmine(reportportalConfig);\n\nagent.getLaunchStartPromise().then((launchData) =\u003e{\n    protractorFlake({\n        maxAttempts: 1,\n        protractorArgs: [\n            './multiThreadConf.js',\n            '--params.id',\n            launchData.id\n        ]\n    }, (status) =\u003e {\n        agent.getExitPromise().then(() =\u003e{\n            process.exit(status);\n        });\n    });\n});\n```\n\n4. Then create protractor's spec file as in example below:\n\n`multiThreadConf.js` file\n\n```javascript\n const ReportportalAgent = require('@reportportal/agent-js-jasmine');\n const reportportalConfig = require('./reportportalConf');\n\n exports.config = {\n     multiCapabilities: [\n         {\n             name: 'normal',\n             browserName: 'chrome',\n             maxInstances: 2,\n             shardTestFiles: true,\n             chromeOptions: {\n                 args: ['--window-size=1024,768', '--disable-infobars']\n             }\n         }\n     ],\n     specs: ['testAngularPage.spec.js', 'testGithubPage.spec.js'],\n     onPrepare() {\n         const config = Object.assign({\n             id: browser.params.id\n         }, reportportalConfig);\n         const agent = new ReportportalAgent(config);\n         /*Its a hack. There is an issue since 2015. That Jasmine doesn't wait for report's async functions.\n          links to the issues https://github.com/jasmine/jasmine/issues/842\n          https://github.com/angular/protractor/issues/1938\n          So it needed to wait until requests would be sent to the Report Portal.\n          */\n         afterAll((done) =\u003e agent.getPromiseFinishAllItems(agent.tempLaunchId).then(()=\u003e done()));\n         jasmine.getEnv().addReporter(agent.getJasmineReporter());\n     }\n\n };\n```\n\n5. Update script section for your `package.json`:\n```javascript\n\"scripts\": {\n    \"protractor-multi\": \"node protractorLaunchFile.js\"\n }\n```\n\n6. Run your protractor:\n```cmd\nnpm run protractor-multi\n```\n\nSee the detailed example with tests in [examples](https://github.com/reportportal/examples-js/tree/main/example-jasmine).\n\nLink to the jasmine issue, that it doesn't work well with async functions\n[jasmine issue](https://github.com/jasmine/jasmine/issues/842),\n[protractor's community](https://github.com/angular/protractor/issues/1938)\n\n# Copyright Notice\nLicensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)\nlicense (see the LICENSE.txt file).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freportportal%2Fagent-js-jasmine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freportportal%2Fagent-js-jasmine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freportportal%2Fagent-js-jasmine/lists"}