Skip to content

Selenium: Create selenium test for covering issue #9620 "In case ws-agent stopped unexpectedly all editors should become in readonly mode or close them"#10354

Merged
Ohrimenko1988 merged 8 commits intomasterfrom
selen-9950
Jul 12, 2018
Merged

Conversation

@Ohrimenko1988
Copy link
Copy Markdown
Contributor

What does this PR do?

Create selenium test for covering issue #9620 "In case ws-agent stopped unexpectedly all editors should become in readonly mode or close them".

What issues does this PR fix or reference?

Issue: #9950

Release Notes

Docs PR

@Ohrimenko1988 Ohrimenko1988 added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. team/che-qe labels Jul 10, 2018
@Ohrimenko1988 Ohrimenko1988 requested a review from vparfonov as a code owner July 10, 2018 11:44

public class EditorBehaviorDuringUnexpectedWsAgentStopTest {
private static final String PROJECT_NAME = NameGenerator.generate("WsAgentTest", 4);
private static final String FIND_CONTAINER_ID_COMMAND_TEMPLATE =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did you check it with Eclipse Che on Docker?

@dmytro-ndp
Copy link
Copy Markdown
Contributor

It's interested to know why it was decided not to use simpler method of stopping WS agent from terminal which was used in test CheckRestoringWorkspaceAfterStoppingWsAgentProcessTest.java.

Also it's not quite clear why the test "CheckRestoringWorkspaceAfterStoppingWsAgentProcessTest.java" was removed because looks like it checked different use case.

toastLoader.clickOnToastLoaderButton("Restart");
toastLoader.waitExpectedTextInToastLoader("Starting workspace runtime...");
waitWorkspaceRunningStatus();
goToFileAndCheckText();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO it may be reasonable to check that editor switched from read-only to normal mode after the workspace had been restored.

@dmytro-ndp
Copy link
Copy Markdown
Contributor

I has just realized that EditorBehaviorDuringUnexpectedWsAgentStopTest expands use case from CheckRestoringWorkspaceAfterStoppingWsAgentProcessTest. At the same time name of new test class EditorBehaviorDuringUnexpectedWsAgentStopTest sounds less general, IMHO, because it doesn't mention verification the fact workspace is restored after stopping. So, I would recommend to use CheckRestoringWorkspaceAfterStoppingWsAgentProcessTest name as more general.

@dmytro-ndp
Copy link
Copy Markdown
Contributor

dmytro-ndp commented Jul 11, 2018

Another advantage of stopping the WS agent by executing the command from the terminal inside the IDE is that it works if the product is run at the remote server compare to selenium tests, whereas stopping by executing the command by command local Docker CLI doesn't work.

@Ohrimenko1988
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10354
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@Ohrimenko1988 Ohrimenko1988 merged commit 05b89fa into master Jul 12, 2018
@Ohrimenko1988 Ohrimenko1988 deleted the selen-9950 branch July 12, 2018 09:44
@benoitf benoitf added this to the 6.9.0 milestone Jul 12, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jul 12, 2018
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.

5 participants