0

I am working in Selenium and I'm a beginner in Selenium. I am unsure of how well I am doing. I wrote a small test script in java language.

I am using page object design pattern with my testing framework. I'm following hybrid data-driven test framework and keeping the test data in a property file.

Now I have a new project to automate. I need to improve my test code in my new project.

My project is a queue management system. It should have admin module. user module, user register module, token booking module, and others.

I want to know if I am doing this the right way and how can I improve?

Should I concentrate on improving my coding skill or on the way I put my automated tests together? I am not sure that I am doing the right thing with my code. What should I try to improve first?

  • 1
    You should be more specific in your question. One could write a book as answer to your question; try to expose what are the bottlenecks and context of your project, so people can spot how to help you. – João Farias Mar 2 '17 at 9:54
  • @ JoãoGFarias I edited can you check ? – user24314 Mar 2 '17 at 10:01
  • 2
    SE has code review exchange where you might be able to get some advice. In general, write more code, read code written by experts, read blogs, learn other languages – Peter M. Mar 2 '17 at 15:00
2

I'm assuming your a tester working in a shop with other developers. You might want to consider approaching one of your fellow developers who is good at Java and ask them to review your code. Developers will sometimes perform a code review on each other's work prior to check-in to improve the code, improve the developer's abilities and catch potential bugs early. Asking one of your fellow developers to do the same for you would be a reasonable thing to do.

1

Some key elements to go by:

  1. Learn the language and its best practices and design patterns. If you know more syntax and are better in problem solving, you can make better choices when implementing test or framework code.
  2. Learn principles especially relevant in automated testing (YAGNI, DRY, ...).
  3. Combine the above points to create a framework that'll allow you to write and maintain tests more easily.
  4. Stay alert for warning signs of any kind, and resolve them per the above:
    • Do I have repeated code?
    • Do I have to invest an excess amount of time to maintain tests?
    • Does it take long to write a simple test?
    • Can other team members easily grasp my framework and tests to add their own?
    • ...

If you've got all these questions (and others) covered, then chances are you're doing it right. :)

See also the answer of Amias here, they are all characteristics of a good test automation setup: Test automation role: challenges beyond automated tests and frameworks?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy