-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Phpunit testing #4994
Phpunit testing #4994
Conversation
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Can one of the admins verify this patch? |
Just to clarify some things, this pull request in current state provides also some general changes in testing model both on the server and IDE side. While working on this PR I have noticed that in the meantime some changes were added, which affects testing framework in general (i.e. PR #4481). I was able to merge those changes into this PR, anyway the changes that I have made also affect testing framework in general and I think that someone from Codenvy and @davidfestal who added some recent changes in Java testing should take a look at this patch and I would be grateful for any discussion about possibility of "merging" the changes that come with this PR. Below is the list of most important changes in testing framework that are a part of this PR:
All of the classes and methods in testing framework internals that in my opinion should be changed/replaced with the ones provided in this PR were marked with @deprecated annotation. I am eager to answer all the questions related to the changes and ready to make necessary tweaks in this PR if the proposed changes are too intrusive. |
@bartlomiej-laczkowski I'll have a look today, or asap. BTW, this issue also seems related to the work done on branch https://github.com/eclipse/che/tree/new-java-test for issue #4679. @evidolob wdyt ? |
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
@davidfestal and whoever who might be related to Che unit testing: any feedback? |
@bartlomiej-laczkowski: regarding your action group refactoring, you should be aware of PR #4980 that somehow merges the project-explorer contextual menus and top-bar menus, to provide a consistent behaviour throughout the IDE. As for the API changes you introduced in the |
Hi @bartlomiej-laczkowski. Thanks for your PR. We need @kaloyan-raev assistance in order to review the PR. His expertise on PHP will be helpful here. We'll have @vparfonov also reviewing the code. Separately, @bartlomiej-laczkowski we need you to document a little bit more your proposed features:
Thanks in advance! |
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
@slemeur I will build this branch and check if the PHPUnit implementation works as expected. I also made @bartlomiej-laczkowski aware of the https://github.com/eclipse/che/wiki/Coding-Guidelines |
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built and tested the PR. Everything works as expected from functional point of view. Tested with both PHP and Zend stacks.
In the PHP stack you can follow the PHP tutorial from the docs and run the test.php
with the 'Run Test > PHPUnit' action from the context menu.
In the Zend stack you can use the 'zend-expressive' project template and then use 'Run Test > PHPUnit' on project level, or on the test
folder, or on a specific test file under the test
folder.
The test results appear in the 'Test Results' view and are correctly marked as successful or failed. Double-clicking on a test opens it in the PHP editor. Failed tests have failure details and stack trace displayed on the right side of the view. Double-clicking on a stack trace element opens it in the PHP editor.
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
I prepared PR eclipse-che/che-docs#241 to update the PHP tutorial with the new PHPUnit plugin. However, I don't find any general doc page about testing in Che Docs like we have for debugging. Is there a place where JUnit and TestNG are documented? If there is, I can update it with PHPUnit too. |
Just before creating any doc etc. and to help the reviewer to do his best, below is the short description of most important changes & new parts of code. As I already mentioned in one of the previous comments those changes are new part of API that are the "second door" for providing test results to IDE part of Che. Some part of already existing interfaces, DTO's and methods were marked as deprecated just to help migrating JUnit and TestNG support to new part of API. I have decided to provide new parts of API and change some existing ones as it provides new possibilities that were just simply not available in previous state of testing support API and it was very hard to change anything as there were some ongoing changes in unit testing framework in the meantime. IDE part:
SHARED part:
SERVER part:
|
Thanks a lot for those clear explanation @bartlomiej-laczkowski ! This is excellent. @vparfonov : Do you need anything more to complete the review and have QA adding tests? |
ci-build |
Build # 2884 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/2884/ to view the results. |
@bartlomiej-laczkowski we are ready to merge it now but it is out of date. Can you please update it according to the master branch? Thanks |
Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com>
@vparfonov I have updated the PR with recent master. |
@bartlomiej-laczkowski thanks |
merged here #5468 thakns for your work |
@vparfonov You are welcome and thanks! |
What does this PR do?
This pull request adds support for PHPUnit testing in Che.
What issues does this PR fix or reference?
#3987
Changelog
Support for PHPUnit testing in Che.
Release Notes
N/A yet
Docs PR
N/A yet