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

Rework and add test for checking of Test Runner plugin #6401

Merged
merged 11 commits into from Sep 28, 2017
Merged

Conversation

musienko-maxim
Copy link
Contributor

@musienko-maxim musienko-maxim commented Sep 22, 2017

What does this PR do?

  • Adapt existing selenium tests for actual UI of the plugin
  • Add new test (JavaTestPluginJuinit4CheckRunSuitesAndScopesTest) for check launching of scope tests from a package, add new methods and resources for the test.
  • Small fixes like syntax error, remove unnecessary fields, methods

@garagatyi, @vparfonov, @tolusha

@musienko-maxim
Copy link
Contributor Author

ci-build

ws.getId(),
Paths.get(resource.toURI()),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider porting this class to master to avoid painful merge conflicts.

Copy link

@garagatyi garagatyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, but I have too little experience in this area, so up 2 @tolusha

assertTrue(pluginConsole.getAllMethodsMarkedDefinedStatus(PASSED).size() == 1);
assertTrue(pluginConsole.getAllMethodsMarkedDefinedStatus(FAILED).size() == 1);
Assert.assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(PASSED).size() == 1);
Assert.assertTrue(pluginConsole.getAllNamesOfMethodsMarkedDefinedStatus(FAILED).size() == 1);
String testErrorMessage = pluginConsole.getTestErrorMessage();
assertTrue(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use static import everywhere if you star using it

*
* @param xoffset offset in pixels for shifting
*/
public void dragConsolesInDefinePosition(int xoffset) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the name of the method is self descriptive I don't want to see any java doc.
Review all javadocs you have added in this PR. https://dev.liferay.com/participate/javadoc-guidelines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the variables xoffset seems weird.

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class JavaTestPluginJuinit4CheckRunSuitesAndScopesTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the name of the class

projectExplorer.waitItem(JUNIT4_PROJECT);
runCompileCommandByPallete(compileCommand);
notifications.waitProgressPopupPanelClose();
consoles.dragConsolesInDefinePosition(-100);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-100 says nothing to me

+ " at org.junit.Assert.assertFalse(Assert.java:64)\n"
+ " at org.junit.Assert.assertFalse(Assert.java:74)\n"
+ " at org.eclipse.che.examples.AppAnotherTest.shouldFailOfAppAnother(AppAnotherTest.java:33)";
+ " at org.junit. fail( java:86)\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is weird to see a space before method.

@eclipse-che eclipse-che deleted a comment from codenvy-ci Sep 26, 2017
@eclipse-che eclipse-che deleted a comment from codenvy-ci Sep 26, 2017
@eclipse-che eclipse-che deleted a comment from codenvy-ci Sep 26, 2017
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class JavaTestPluginJunit4CheckRunSuitesAndScopesTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Author?

}

/**
* click on the item in the result tree. If will be some items with the same name - will select
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uppercase?

@musienko-maxim musienko-maxim merged commit 393451f into master Sep 28, 2017
@codenvy-ci
Copy link

@slemeur slemeur added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Sep 28, 2017
@slemeur slemeur added this to the 5.19.0 milestone Sep 28, 2017
@musienko-maxim musienko-maxim deleted the CHE#6332 branch September 28, 2017 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants