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.

We are developing Page Object Model Framework for our web application test. The problem is we are having three different structure for the same page type. We want our automation to work in all cases. What is the best way to handle these scenario?

share|improve this question
1  
Are you saying (1) by design, your pages have three different structures, or (2) your developers change the page structure frequently? –  user246 Jun 7 at 0:12
    
Developers change the page frequently. And different environment has different version of the page for testing the backward compatibility –  user2680325 Jun 7 at 1:50
    
Do you mean a layout of a page changes frequently or even elements are moved between different pages? –  dzieciou Jun 7 at 3:43
1  
I am not sure I understand your real problem, maybe you can give more context why the Page Object model is not working for your case. What problems do you run into with these three different structures? (maybe you can provide examples) As a side note, do the developers update the tests if they change the page? –  Niels van Reijmersdal Jun 7 at 11:09
    
You should always automate your test for the shipable version of application only. Those under RND shall not be automated, as you need to understand the cost of automation is very high. –  cL83 Aug 15 at 9:55

1 Answer 1

My first advice is to not write automated tests for pages that change frequently. You may be better off testing those pages manually.

If you insist on automation, think about which aspects of the pages do not change, and write classes to model those aspects. For example, if forms always consist of text fields and a submit button, you can write a class to model that. Or if your submit buttons always have the same CSS class, or always have the same ID, you can write a class to model that.

share|improve this answer
3  
A solution somewhere between automate and not automate would be to automate tests of an API, if that's a layer that is more stable. –  dzieciou Jun 7 at 3:44
    
yes I agree, Until meaningful amount of features are stable, your efforts will not go in vain. –  Siva Jun 7 at 8:21
    
Here is the problem, developers keep changing the Html code of the element together with the page structure ( means delete, modify or add new features on the page) –  user2680325 Jun 8 at 13:41
    
Not automating sounds like a good choice here - if you try to automate something that changes that much you'll spend all your time trying to catch up to the latest changes and never really have any meaningful automation. –  Kate Paulk Jun 9 at 11:11
1  
Automation makes the most sense when the interface stays the same but the implementation changes. It makes the least sense when the interface is always changing. –  user246 Jun 10 at 2:01

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.