Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

When a selenium test script executes unusually slow, what are the possible reasons which could be making script performace slow ?

What steps should a tester use to analyse and debug the problem?

share|improve this question
3  
What kind of script you have in mind? Manual script? Script for test automation of RIA? Script for application deployment? Script for DB setup? –  dzieciou May 28 '12 at 15:37
    
Jasmine, I do not know what you mean by "usually slow". Also, has the script always run slow, or was there a time when it ran faster? –  user246 May 28 '12 at 16:13

5 Answers 5

possible thing is to divide your test methods and your web element objects are in separate classes,it will give you good performance,Follow page object design.

share|improve this answer

If the selenium tests/objects are embedded into a script in another language (eg java or python), make sure that the underlying code in those scripts aren't slowing you down. For example, external process/function calls or excessive string concatenation, which both could be common in testing scripts, can be slow things down considerably.

share|improve this answer

too much use of xpath will make the test run slow. so this should be the last resort. we should always try to follow the selenium object identification like use id then name and link before using xpath or csspath.

share|improve this answer

In some cases Xpath selectors can slow down the run time.

share|improve this answer
  • The script uses a poor algorithm, and therefore executes many more statements than are necessary.
  • The script uses external resources (e.g. disk or remote servers) that inject numerous or lengthy delays into the execution.
  • The script's job is inherently computationally expensive.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.