File Import script non platform dependent [message #1695944] |
Wed, 20 May 2015 13:08 |
Koen Staal Messages: 70 Registered: October 2014 |
Member |
|
|
I want to test my import implementation.
When i searched for a solution i ended up at this page https://www.eclipse.org/rcptt/documentation/userguide/contexts/folder/.
The solutions presented on the page were not sufficient because the test scripts you write are platform dependent. If someone else runs the tests it would fail, this is not something you want as test platform.
I found a solution that works for me, and it uses the workspacecontext. Basicly you create a project in the context and the file you want to import should be in this project.
You could use 2 projects if imporing the file to the same project causes a conflict.
let [val workspace [get-workspace-location]]
[val file "\fromProject\models\legacy.xml"]
{
get-menu "File/Import..." | click
get-window Import | get-tree | select "MyImport/Import Legacy XML as myImp" | double-click
get-window "File Import Wizard" | get-editbox -after [get-label "Select File:"] | set-text [format "%s%s" [str $workspace] [str $file]]
}
I wonder what you guys think.
I hope this snippet helps others
[Updated on: Wed, 20 May 2015 15:19] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03305 seconds