Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make syncing test files to expected folders default #13022

Closed
wants to merge 1 commit into from

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented May 31, 2018

Renames the command to development:sync-system-test-expected

@sgiehl sgiehl added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review labels May 31, 2018
@sgiehl sgiehl added this to the 3.6.0 milestone May 31, 2018
@tsteur
Copy link
Member

tsteur commented May 31, 2018

The problem is that there might be random test failures, or expected test failures from existing changes etc, especially working in branches etc and then it causes more work most of the time than copying to expected directly and it is easy and quick to compare screenshot tests in phpstorm and copy them over to expected from processed but takes a while to look at local history etc to know what changes you are going to make. etc....

As long as it is possible for a developer to change the default, or pass an option it might be ok to make it default. But there is some "risk" that it makes working with things slower and that you accidentally commit broken screens and then forget to fix the test etc.

@sgiehl
Copy link
Member Author

sgiehl commented May 31, 2018

The command "only" syncs the system test files. UI files are synced with another command, but are synced to expected folders only.

@tsteur
Copy link
Member

tsteur commented May 31, 2018

I see. In this case I would vote quite strongly against this. For system tests it is way too easy to miss some changes in travis and it'd be much safer to first double check all the individual changes in the diff before moving them to expected. For people that might use a visual git commit tool like in PHPStorm that might not be too bad, but for the rest of the world it becomes unusable :)

@sgiehl
Copy link
Member Author

sgiehl commented May 31, 2018

I'm fine with closing this again. For me I'm always syncing to expected and check the diff with git or simply add what I consider valid with git add -p

@tsteur
Copy link
Member

tsteur commented May 31, 2018

Yeah for me it's just not really practical to validate a big diff through git diff

@sgiehl
Copy link
Member Author

sgiehl commented May 31, 2018

How are you validating the changes then?

@tsteur
Copy link
Member

tsteur commented May 31, 2018

image

PHPStorm

@mattab
Copy link
Member

mattab commented Jun 1, 2018

I also use phpstorm to compare the "Expected" folder in the current local branch, to the "expected" on the remote, the result I think is the same. maybe we can make it the default to copy to expected/, but leave the option to copy to the processed/ folder instead

@tsteur
Copy link
Member

tsteur commented Jun 3, 2018

I also use phpstorm to compare the "Expected" folder in the current local branch, to the "expected" on the remote, the result I think is the same.

I don't do that. I compare processed with expected.

I don't use any of the Git features in PHPStorm as it is slow and not transparent what it does etc. So if expected is default, it becomes kind of useless. If there's an option to use processed that's fine. I'll just have to always set the option.

In general I would still prefer the processed to be the default as it reduces the risk that someone just syncs the tests and pushes it and we start expecting wrong results. Happens so easy...

@sgiehl
Copy link
Member Author

sgiehl commented Jun 25, 2018

Closing this now. For me it doesn't really make a difference if processed or expected is the default as long as there is a parameter to change the behavior. So let's keep it as is for now.

@sgiehl sgiehl closed this Jun 25, 2018
@sgiehl sgiehl deleted the renamesynccommand branch February 3, 2019 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants