samples/pantheon.js
function doCategory(category) {
	check(http.get(category.url), {
		"title is correct": (res) => res.html("title").text() == category.title,
	});

	for (prodName in category.products) {
		if (Math.random() <= category.products[prodName].chance) {
			group(prodName, function() { doProductPage(category.products[prodName]) });
		}
	}
}
function doCategory(category) {
	check(http.get(category.url), {
		"title is correct": (res) => res.html("title").text() == category.title,
	});

	for (prodName in category.products) {
		if (Math.random() <= category.products[prodName].chance) {
			group(prodName, function() { doProductPage(category.products[prodName]) });
		}
	}
}
function doCategory ( category ) { check ( http . get ( category . url ) , { "title is correct" : ( res ) => res . html ( "title" ) . text ( ) == category . title , } ) ; for ( prodName in category . products ) { if ( Math . random ( ) <= category . products [ prodName ] . chance ) { group ( prodName , function ( ) { doProductPage ( category . products [ prodName ] ) } ) ; } } }
Load a product category page, then potentially load some product pages
Load a product category page then potentially load some product pages