Coder Social home page Coder Social logo

abhishekkyd / protractor-html-reporter-2 Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 13.0 1.27 MB

To generate graphical HTML report with pie charts for Protractor test execution

License: MIT License

JavaScript 34.06% CSS 9.01% HTML 56.93%
protractor protractor-e2e-test protractor-tests protractor-helper html-report pie-chart screenshot testsuite xml protractor-html-reporter-2

protractor-html-reporter-2's Introduction

Hi there ๐Ÿ‘‹

I am an agile (scrum) and automation enabler, believe in an inline automated regression suite with the current sprint. I am capable to handle a team and enable them to a continuous testing approach using a better Test Strategy.

I approach to enable the team for:

  • Everybody is responsible for Quality
  • Continuous Testing and Continuous Delivery
  • Adopt a quality first delivery model for a better customer experience

Adding, Low Code Development, Bot Development, Cloud Solutions Testing, Workflow Automation Testing, Machine Learning Testing, and GraphQL Testing to my skills.

I have incredibly good experience in Agile, Scrum, DevOps, Software Testing, STLC, Automation Testing & Automation Framework Development from scratch. Developed API Contract testing using Pact, API automation frameworks using Rest Assured, mobile automation frameworks using Appium (Android & iOS), web automation frameworks using Selenium, Protractor, WebDriver IO & Cypress, BDD framework using Cucumber from scratch for different projects. I used Maven, Gradle as build tools, and Jenkins, CircleCI, and Travis as CI/CD tools.

I am keen to learn about new technologies and try to adopt useful things in my daily routines. I always love to find a solution to a problem.

Nowadays, I passionate about blockchain technologies so that I'm mainly focusing on the Defi development stack.

GIF

  • ๐ŸŒฑ Iโ€™m currently learning blockchain technologies
  • ๐Ÿค” Iโ€™m looking to help with buliding defi and web apps
  • ๐Ÿ’ฌ Ask me about web and blockchain development
  • โšก Fun fact: I can find a high-impact defect in any product

Blockchain Development

Web & Mobile Development

Other

Languages and Tools:

amplify android angular angularjs aws azure bootstrap c codeigniter cplusplus csharp css3 django docker dotnet express figma firebase flask flutter gatsby git go graphql heroku hexo html5 illustrator java javascript karma kotlin laravel linux mocha mongodb mssql mysql nestjs nextjs nginx nodejs nuxtjs opencv oracle photoshop php postgresql postman python rails react reactnative redux ruby rust sass sqlite tailwind tensorflow typescript unity vuejs xd

protractor-html-reporter-2's People

Contributors

abhishekkyd avatar jamesomorodion avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

protractor-html-reporter-2's Issues

Screenshot naming does not match format of Jasmine2HtmlReporter output

When fix screenshot name is applied to Jasmine2HtmlReporter, output of screenshot is named "test-case-name.png". No browser or Test Suite prefix, and test case name space is sanitized to replace spaces with hyphen.

This reporter does not sanitize to match. It adds browser and test suite as prefix and test case name spaces aren't replaced with hyphens.

For compatibility and flexibility reasons I believe we need the ability to specify a replace character, and options to exclude browser and test suite prefix.

I can write a suggested fix if needed, unless this wasn't meant to support this convention.

The below name manipulation logic needs update:

//get test cases screenshots names (on failure only)
if (testCasesResults[j] != 'Failed' && report.screenshotsOnlyOnFailure) {
screenshotsNamesOnFailure.push('None');
} else {
if (report.modifiedSuiteName) {
screenshotsNamesOnFailure.push(report.browser +'-'+ suite.name.substring(suite.name.indexOf(".")+1) + ' ' + testCasesNames[j] + '.png');
// screenshotsNamesOnFailure.push(report.browser +'-'+ testSuites[i].attr.name.substring(testSuites[i].attr.name.indexOf(".")+1) + ' ' + testCasesNames[j] + '.png');
}
else {
screenshotsNamesOnFailure.push(report.browser +'-'+ suite.name + ' ' + testCasesNames[j] + '.png');
}
}

Screenshot is not shown in HTML report if the name contains "#"

I am currently using jasmine-tagged to add #p0 to the it()s I want to run as my sanity test suite.
Since the screenshot generated contains the name of the spec, it will contain "#".
The HTML report will not show the screenshot because of this.

Could we change this behavior? Or provide a way to configure the name of the screenshots the HTML reporter should look for?

Thanks.

Not able to view the screenshots in the html report

Hi Guys,

I am not able to see the the screenshot in the html file.It displays an error screenshot not found.I even checked out your example ,ProtractorTestReport and it displays the same error.
Please let me know if i am missing anything or need to do anything differently.

New Feature - Add Failure Stacktrace

Hey guys,
Thanks for the great report.

Just would like to ask about an improvement.
In the jasmine xml report, there is the failure tag:

<failure type="exception" message="Failed: No element found using locator: By(css selector, #password)">
<![CDATA[NoSuchElementError: No element found using locator: By(css selector, #password) 
...
</failure>

That contains the stacktrace of the failure.

Would it be possible for you to include this to the HTML page?
I could also help implementing this.

Regards!

Cannot find module 'protractor-html-reporter-2'

@abhishekkyd
I did an npm install -g 'protractor-html-reporter-2 (which is not in your instructions) and packages were downloaded;
yet I am getting the following error, when running protractor conf.js-

Cannot find module 'protractor-html-reporter-2'
Error: Cannot find module 'protractor-html-reporter-2'

I have done the set-up exactly as your instructions -

onPrepare: function () {
		var jasmineReporters = require('jasmine-reporters');
		jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
			consolidateAll: true,
			savePath: './',
			filePrefix: 'xmlresults'
		}));

		var fs = require('fs-extra');

		fs.emptyDir('screenshots/', function (err) {
			console.log(err);
		});

		jasmine.getEnv().addReporter({
			specDone: function (result) {
				if (result.status == 'failed') {
					browser.getCapabilities().then(function (caps) {
						var browserName = caps.get('browserName');

						browser.takeScreenshot().then(function (png) {
							var stream = fs.createWriteStream('screenshots/' + browserName + '-' + result.fullName + '.png');
							stream.write(new Buffer(png, 'base64'));
							stream.end();
						});
					});
				}
			}
		});
	},

	//HTMLReport called once tests are finished
	onComplete: function () {
		var browserName, browserVersion;
		var capsPromise = browser.getCapabilities();

		capsPromise.then(function (caps) {
			browserName = caps.get('browserName');
			browserVersion = caps.get('version');
			platform = caps.get('platform');

			var HTMLReport = require('protractor-html-reporter-2');

			testConfig = {
				reportTitle: 'Protractor Test Execution Report',
				outputPath: './',
				outputFilename: 'ProtractorTestReport',
				screenshotPath: './screenshots',
				testBrowser: browserName,
				browserVersion: browserVersion,
				modifiedSuiteName: false,
				screenshotsOnlyOnFailure: true,
				testPlatform: platform
			};
			new HTMLReport().from('xmlresults.xml', testConfig);
		});
	}

Please help? Many thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.