47147[TASK] Codeception Add page test
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Timo Hund +1
-
Verified V +2
- Christian Kuhn +2
- Timo Hund +1
Issues 1
Files 1
Review log 10
-
Roland Golla uploaded patch set 1 03/07/16, 15:31
-
Timo Hund commented on patch set 1 CR +1 V +1 03/12/16, 12:30
Looks good for me. But we should refactor the testsuite in a followup to centralize the "css selectors" and "xpathes" that are used in the backend to simplfy adoptions later when they get changed. Test is running through in my fork with travis. -
Roland Golla commented on patch set 1 03/12/16, 12:44
Yes. I will do it. On next steps i made a few helpers for the selectors on navigation. I will refactor all the selectors in the tests. This will be on a new ticket. -
Christian Kuhn voted on patch set 1 CR +2 V +2 03/24/16, 08:47
-
Gerrit merged patch set 1 03/24/16, 08:47
-
Steffen Müller commented on patch set 2 03/24/16, 10:06
The test class tests at least two feature in one go, which makes the test code harder to read and potential test failures harder to understand. Deleting a page in a test called AddPage is superfluous. If AddPage test case turns red, what feature would you expect to be broken? Adding a page or deleting a page? -
Roland Golla commented on patch set 2 03/24/16, 13:25
This is not a unit test. Acceptance testing is testing user stories. Sure you could rename it to AddRemovePageInPageModuleCest. A codeception test on error will make a screenshot and the full html with ajax call. So you will see very quick what failed. And also we have a recoder that makes a slideshow from beginning to the error. -
Steffen Müller commented on patch set 2 03/24/16, 14:36
I disagree. Nothing prevents us from writing two Tests (or more) for the same user story. It has no drawbacks, but several benefits. 1. What if someone gets the idea to add a test to delete a page? He probably won't look into AddPage test to find out that DeletePage has already been implemented. Will he? Hiding this test inside AddPage makes it harder to contribute. 2. In the current state of the test, you can't test deleting pages, if adding pages through the Backend fails. If you split it into two scenarios, you could: Add a page with title using the backend, Then test if it was added. Add a page fixture, Then delete it using the backend, Then test if it was deleted. 3. If the user story is about handling pages, then it might contain even more actions, like add, edit, move, delete, undelete, hide, unhide, ... Putting all these actions into one big ball of mud does not sound funny, does it? -
Steffen Müller commented on patch set 2 03/24/16, 14:37
Edit: Does travis create screenshot + slideshow on failure? Where are they stored? -
Christian Kuhn commented on patch set 2 03/24/16, 20:16
Yes, the test does 2 different things. At the moment I'm unsure if we should keep it that way or not, though. But I'll apply some changes to the test infrastructure the next days anyway and will give this more thoughts then. travis-ci currently does not save + upload screenshots of failed runs. this is on my list, and I'm eager to find a reasonable solution for that, too.