0

I have written a Java program using Selenium HTMLUnitDriver. It consists of a few methods which basically first scrape a site for some elements, then interact with these elements, and then finally fills in and submits a form. I run these few methods a number of times and record the time between the beginning of the first method and the end of the last method each time. The run time seems to go down overtime. Why is this?

rahc01
  • 47
  • 7
  • There can be a few dozen reasons for this, including stuff like caching, OS interference, background tasks, ... – UnholySheep Dec 06 '16 at 08:30
  • how long is your test running? If you run it over hours with the same driver than it will slow down.. but as UnholySheep already said, there are tons of other reasons for this behaviour too ;) – metar Dec 06 '16 at 08:38
  • If your webpage is communicating with a database, one possible reason might be its indexing. – JDelorean Dec 06 '16 at 09:55
  • First time I run the program it takes about 6-7 seconds. Then by the 5th time it's down to around 2. I'm just running it in Eclipse. Thanks for the responses! – rahc01 Dec 06 '16 at 22:29

0 Answers0