Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserman-client

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserman-client

test you code in real browsers

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#CLI

###Usage:

Usage: browserman [options] [command]

Commands:

	config [options]       config server port and address
	list                   list all available browsers
	test [options]         test a page in all browsers that meets the requirement
	

###List available browsers:

run:

browserman list

and you would find the browsers that are ready to work:

-------------------------------------------
3 workers found
-------------------------------------------
Firefox(28.0.0)
Safari(6.0.0)
Chrome(34.0.0)

###Run a test:

usage:

Usage: test [options]
	
	Options:
	
		-u, --url [url]            url of the page to test
		-p, --path [path]          path of the page to test
		-b, --browser [browser]    ["chrome@>10.0.0","firefox@>6.0.0"]
		-d, --verbose              needs verbose output or not
		-r, --reporter [reporter]  which reporter to use, defaults to base reporter
		-s, --screenshot           wants a screenshot or not

for example, run:

browserman test -u 'http://browserman.dp:9000/public/test.html' 

you will see:

✓ passes: 3 failures: 0 on Safari(6.0)
✓ passes: 3 failures: 0 on Chrome(34.0)
✓ passes: 3 failures: 0 on Firefox(28.0)

and you can use --verbose to see the detail:

-----------------------------------------------------------
✓ passes: 3 failures: 0 on Safari(6.0)
-----------------------------------------------------------
✓ Foobar #convertText() should convert text
✓ Foobar #runMethod() should run a method
✓ Foobar #sayHello() should return some text

-----------------------------------------------------------
✓ passes: 3 failures: 0 on Chrome(34.0)
-----------------------------------------------------------
✓ Foobar #convertText() should convert text
✓ Foobar #runMethod() should run a method
✓ Foobar #sayHello() should return some text

-----------------------------------------------------------
✓ passes: 3 failures: 0 on Firefox(28.0)
-----------------------------------------------------------
✓ Foobar #convertText() should convert text
✓ Foobar #runMethod() should run a method
✓ Foobar #sayHello() should return some text

#Program API

Browserman also offers javascript api:

###List

var browserman = new Browserman({
	host:'browserman.dp',
	port:'9000'
});
	
browserman.list().('done', function(workers) {
	// you get the workers
}).on('error',function(err){
	// an error occured
}).on('complete', function() {
	// completed
});

###Test

var browserman = new Browserman({
	host:'browserman.dp',
	port:'9000'
});
	
browserman.test({
	path:'path or html file',
	url:'page url',
	timeout:50000,
	requirement:{
		browser:[
			'chrome@>10.0.0',
			'firefox@>6.0.0'
		],
		screenshot:false
	}
}).on('done', function(result) {
	// result by one browser
}).on('error',function(err){
	// an error occured
}).on('complete', function() {
	// completed
})

Keywords

FAQs

Package last updated on 07 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc