Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Manual Test Cases"

(other cases)
Line 3: Line 3:
 
= Resolve merge conflicts =
 
= Resolve merge conflicts =
 
The section describes how to resolve conflicts resulted from git merge , by using Orion git status and writable compare editor pages.
 
The section describes how to resolve conflicts resulted from git merge , by using Orion git status and writable compare editor pages.
Please note that the expected result from the test cases only applies in Orion M7. A better solution(3-way compare) will be addressed after M7 and the '''same''' steps will apply.  
+
Please note that the expected result from the test cases only applies in Orion M7. A better solution(possibly 3-way compare) will be addressed after M7 and the '''same''' steps will apply.  
 
There are 3 test cases in this section. The test cases assume that you have a remote Git repository and a cloned local Git repository.
 
There are 3 test cases in this section. The test cases assume that you have a remote Git repository and a cloned local Git repository.
When both the repositories modify the same file at the same places , conflicts may happen during merge and manual modification is needed in Orion to resolve them.
+
When both of the repositories modify the same file at the same places , conflicts may happen during merge and manual modification is needed to resolve them.
Before executing the test cases you need to do:
+
Before executing the test cases you want to ''simulate'' a remote Git repository and prepare a local clone from it:
  
 
* In your server's local drive , find a folder and use Git Bash there.
 
* In your server's local drive , find a folder and use Git Bash there.
 
* In Git bash , use "git init remote". This will create an empty git repository called remote.
 
* In Git bash , use "git init remote". This will create an empty git repository called remote.
* In git bash , use "git clone remote local".This will clone a git repository called local.
+
* In git bash , use "git clone remote local".This will clone a git repository called local. As an alternative ,You can also [[Orion/How_Tos/Working_with_git#Cloning_a_Git_repository|clone]] the local in Orion.
 
* In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.
 
* In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.
* In Orion , create two folders and link the full path of "remote" and "local" , respectively.
+
* In Orion , create two folders and [[Orion/How Tos/Install Orion on Localhost#Linking_to_existing_content|link]] the full path of "remote" and "local" , respectively.
  
 
== Both repository modified the same file ==
 
== Both repository modified the same file ==
* In remote folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)
+
* In Orion navigator at the '''remote''' folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)
 
  line1
 
  line1
 
  line2
 
  line2
Line 23: Line 23:
 
  line6
 
  line6
 
  line7
 
  line7
* In Orion navigator , click on [more]->[git status] from the '''remote''' folder action. This brings you to the git status page.
+
* In Orion navigator at the '''remote''' folder, click on [more]->[git status] action. This brings up the git status page on remote.
 
* In git status page , stage file1.txt and commit it.
 
* In git status page , stage file1.txt and commit it.
* Come back to navigator page , click on [more]->[git remote] from the '''local''' folder action. This brings you to the git remote page.
+
* Come back to navigator page at the '''local''' folder, click on [more]->[git remote] action. This brings up the git remote page on local.
* In git remote page ,click on ''Fetch'' action on the top left corner of the page. You will see file1.txt is fetched.
+
* In git remote page ,click on ''Fetch'' action at the top left corner of the page. You will see file1.txt is fetched.
 
* Click on ''Merge'' action , file1.txt is pulled into '''local''' folder.
 
* Click on ''Merge'' action , file1.txt is pulled into '''local''' folder.
* Come back to navigator page , click on file1.txt from the '''remote''' folder. This brings up the Orion editor.
+
* Come back to navigator page at '''remote''' folder , click on file1.txt. This brings up the Orion editor.
 
* In the editor , change the file1.txt to something like below , and save.
 
* In the editor , change the file1.txt to something like below , and save.
 
  line1
 
  line1
Line 38: Line 38:
 
  line7
 
  line7
 
* Go to git status page and commit the change.
 
* Go to git status page and commit the change.
* Come back to navigator page , click on file1.txt from the '''local''' folder. This brings up the Orion editor.
+
* Come back to navigator page at '''local''' folder, click on file1.txt. This brings up the Orion editor.
 
* In the editor , change the file1.txt to something like below , and save.
 
* In the editor , change the file1.txt to something like below , and save.
 
  line1
 
  line1
Line 48: Line 48:
 
  line7
 
  line7
 
* Go to git status page and commit the change.
 
* Go to git status page and commit the change.
* Come back to navigator page , click on [more]->[git remote] from the '''local''' folder action. This brings you to the git remote page.
+
* Come back to navigator page at '''local''' folder again, click on [more]->[git remote] action.
 
* Fetch and merge again.
 
* Fetch and merge again.
* Go to git status page again from the '''local''' folder action.File1.txt is marked as conflicted.
+
* Go to git status page again on the '''local''' folder.File1.txt is marked as conflicted.
 
* Click on the "side by side compare" action on file1.txt , this will bring up the compare editor as below:
 
* Click on the "side by side compare" action on file1.txt , this will bring up the compare editor as below:
 
[[Image:orion-conflict-test1.png]]
 
[[Image:orion-conflict-test1.png]]
 
* You can now modify the red block on the left side of the compare editor and change it to some thing like below and save it.
 
* You can now modify the red block on the left side of the compare editor and change it to some thing like below and save it.
 
  line 4 changed by both remote and local
 
  line 4 changed by both remote and local
* Go back to git status page for the '''local''' folder, click on the "resolve conflict" action (equals to stage action for the normal case)
+
* Go back to git status page on the '''local''' folder, click on the "resolve conflict" action (equals to stage action for the normal case)
 
* Commit the change.
 
* Commit the change.
 
* Now you are able to push the change back to remote and the conflicts are resolved.
 
* Now you are able to push the change back to remote and the conflicts are resolved.
  
== Remote deletes and local modifies the same file ==
+
== Remote deleted and local modified the same file ==
== Remote modifies and local deletes the same file ==
+
Working ....
 +
== Remote modified and local deleted the same file ==
 +
Working ....
  
= To be continued... =
+
= Future Test Cases... =
  
 
[[Category:Orion|Manual Test Cases]]
 
[[Category:Orion|Manual Test Cases]]

Revision as of 08:48, 26 April 2011

This page contains some complex test cases that needs manual steps in Orion.

Resolve merge conflicts

The section describes how to resolve conflicts resulted from git merge , by using Orion git status and writable compare editor pages. Please note that the expected result from the test cases only applies in Orion M7. A better solution(possibly 3-way compare) will be addressed after M7 and the same steps will apply. There are 3 test cases in this section. The test cases assume that you have a remote Git repository and a cloned local Git repository. When both of the repositories modify the same file at the same places , conflicts may happen during merge and manual modification is needed to resolve them. Before executing the test cases you want to simulate a remote Git repository and prepare a local clone from it:

  • In your server's local drive , find a folder and use Git Bash there.
  • In Git bash , use "git init remote". This will create an empty git repository called remote.
  • In git bash , use "git clone remote local".This will clone a git repository called local. As an alternative ,You can also clone the local in Orion.
  • In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.
  • In Orion , create two folders and link the full path of "remote" and "local" , respectively.

Both repository modified the same file

  • In Orion navigator at the remote folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)
line1
line2
line3
line4
line5
line6
line7
  • In Orion navigator at the remote folder, click on [more]->[git status] action. This brings up the git status page on remote.
  • In git status page , stage file1.txt and commit it.
  • Come back to navigator page at the local folder, click on [more]->[git remote] action. This brings up the git remote page on local.
  • In git remote page ,click on Fetch action at the top left corner of the page. You will see file1.txt is fetched.
  • Click on Merge action , file1.txt is pulled into local folder.
  • Come back to navigator page at remote folder , click on file1.txt. This brings up the Orion editor.
  • In the editor , change the file1.txt to something like below , and save.
line1
line2 changed by remote
line3
line4 changed by remote
line5
line6
line7
  • Go to git status page and commit the change.
  • Come back to navigator page at local folder, click on file1.txt. This brings up the Orion editor.
  • In the editor , change the file1.txt to something like below , and save.
line1
line2 
line3
line4 changed by local
line5
line6 changed by local
line7
  • Go to git status page and commit the change.
  • Come back to navigator page at local folder again, click on [more]->[git remote] action.
  • Fetch and merge again.
  • Go to git status page again on the local folder.File1.txt is marked as conflicted.
  • Click on the "side by side compare" action on file1.txt , this will bring up the compare editor as below:

Orion-conflict-test1.png

  • You can now modify the red block on the left side of the compare editor and change it to some thing like below and save it.
line 4 changed by both remote and local
  • Go back to git status page on the local folder, click on the "resolve conflict" action (equals to stage action for the normal case)
  • Commit the change.
  • Now you are able to push the change back to remote and the conflicts are resolved.

Remote deleted and local modified the same file

Working ....

Remote modified and local deleted the same file

Working ....

Future Test Cases...

Copyright © Eclipse Foundation, Inc. All Rights Reserved.