-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcae146
commit 5f72df3
Showing
7 changed files
with
66 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
# Azure Pipelines Protractor Report | ||
[![Donate](https://img.shields.io/static/v1?logo=paypal&label=PayPal&message=Donate&color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZH953HFWKBJFA) | ||
[![Build Status](https://dev.azure.com/maciejmaciejewski-dev/extensions/_apis/build/status/Protractor/extension-build?branchName=master)](https://dev.azure.com/maciejmaciejewski-dev/extensions/_build/latest?definitionId=1&branchName=master) | ||
|
||
Azure DevOps extension that provides task for Publishing Protractor HTML Reports into built into Azure Storage which ten can be viewed as a tab embeded into Build and Release pages. | ||
# Protractor Report Tab for Azure Pipelines | ||
|
||
The extension uses HTLM report from [Protractor Beautiful Reporter](https://www.npmjs.com/package/protractor-beautiful-reporter) | ||
Azure DevOps extension that provides a task for publishing Protractor report in a HTML format and embeds it into a Build and Release pages. | ||
|
||
For more info please refer to documentation page on [GitHub](https://github.com/maciejmaciejewski/azure-pipelines-protractor) | ||
The extension is and will remain free of charge, however if you would like to support me please consider donating by using the PayPal button above. | ||
|
||
## Configuration | ||
|
||
### Protractor | ||
|
||
Before starting using this extension it is necessary to install `Protractor Beautiful Reporter` package via npm. For more information and configuration please refer to [protractor-beautiful-reporter](https://www.npmjs.com/package/protractor-beautiful-reporter). | ||
|
||
```JavaScript | ||
import * as BeautifulReporter from 'protractor-beautiful-reporter'; | ||
|
||
const beautifulReporter = new BeautifulReporter({ | ||
baseDirectory: resultsDir, | ||
screenshotsSubfolder: 'screenshots', | ||
jsonsSubfolder: 'jsons', | ||
takeScreenShotsOnlyForFailedSpecs: false, | ||
docName: 'report.html', | ||
preserveDirectory: true | ||
}); | ||
|
||
jasmine.getEnv().addReporter(beautifulReporter.getJasmine2Reporter()); | ||
|
||
``` | ||
|
||
### Extension | ||
|
||
In order to see report on Protractor Tab one must first use `Publish Protractor Report` task. This is supporting task which makes Protractor tab visible. | ||
|
||
This task takes two parameters - required `cwd` which is a path to Protractor Report directory and also optional `tabName` which is the name of the tab displayed within Azure DevOps report. The directory used to generate HTML must contain `combined.json` - file which is a source of the data displayed in the report. We also check content of `screenshots` directory for associated screenshots image files and upload them as attachments to the Azure DevOps cloud storage. | ||
|
||
#### Example YAML setup | ||
|
||
```YAML | ||
steps: | ||
- task: PublishProtractorReport@1 | ||
displayName: 'Publish Protractor Report' | ||
inputs: | ||
cwd: './protractor' | ||
tabName: 'My Web Test' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters