我会做这样的事情...
for (each product)
{
// navigate to old site
// verify product name
// scrape all product SKUs and create a comma delimited string
String oldSkus = "sku1,sku2,sku3";
// scrape all prices and create a comma delimited string
String oldPrices = "$1.00,$2.00,$3.00";
// navigate to new site
// verify product name
// scrape all product SKUs and create a comma delimited string
String newSkus = "sku1,sku2,sku3";
// scrape all prices and create a comma delimited string
String newPrices = "$1.00,$2.00,$4.00";
// compare old and new SKUs and write to CSV
// compare old and new prices and write to CSV
}
我会写一行每次比较使用CSV文件|作为分隔符。实际是从新的网站和预期是从旧的。然后您可以将该文件导入到Excel中。一些示例行在下面(带标题)。
Product Name|Validation|Result|Expected|Actual
Product1|Compare SKUs|PASS|sku1,sku2,sku3|sku1,sku2,sku3
Product1|Compare prices|FAIL|$1.00,$2.00,$3.00|$1.00,$2.00,$4.00
Product2|Compare SKUs|PASS|sku1,sku2,sku3|sku1,sku2,sku3
Product2|Compare prices|FAIL|$1.00,$2.00,$3.00|$1.00,$2.00,$4.00
将此导入到Excel后,您可以快速筛选以仅显示失败的测试并开始调查。我定期使用非常类似的方法来验证产品是否正确加载到我们的eComm网站上。