Your customer needs to load test their API but you're short on time and have to deliver some numbers within a week. Ah, and you've never done any load testing before. What do you do?
usersfile.readlines(): if not line.startswith('#'): users.append(line.strip().split(',')) usersfile.close() … (uidToUse, pwdToUse) = users[grinder.threadNumber % len(users)] The Grinder
getContractsTemplate.replace("${uid}", username) result = request301.POST(URL, contractsMsg, headers) if 'soap:Fault' in httpResponse.text: grinder.logger.debug(result.text) grinder.statistics.forCurrentTest.setSuccess(False) return result … contractsResponse = self.getContractsRequest(uidToUse, securityKey) contractMatch = contractNumExpression.search(contractsResponse.text) if contractMatch: contractNum = contractMatch.group(1) if contractMatch: self.getContractDetailRequest(uidToUse, securityKey, contractNum) The Grinder