YahooArchive / arrow

FE Test framework designed to promote TDD
http://yahoo.github.io/arrow/arrow_intro.html
BSD 3-Clause "New" or "Revised" License
55 stars 59 forks source link

fix bugs about library loading for multiple descriptors import #248

Closed kennypeng closed 10 years ago

kennypeng commented 10 years ago

When doing multiple descriptors loading, found 2 bugs:

  1. relativePath should be changed for different testData
  2. common library concat should add "," while it originally has value

Please help to review my findings.

pranavparikh commented 10 years ago

@kenyeah Thanks for the PR. Can you document an example and add a test ?

kennypeng commented 10 years ago

Hi I have update examples and tests.

pranavparikh commented 10 years ago

Thanks @kenyeah . Let me take a look.

kennypeng commented 10 years ago

Hi, I have update the demo file. Please try to test it by using current arrow version. And you will find the error like:

$ ./node_modules/yahoo-arrow/index.js --version v0.6.3 $ ./node_modules/yahoo-arrow/index.js demo/test/import-multiple-descriptor.json --seleniumHost={seleniumHost} --brows=firefox-latest --logLevel=debug [2014-05-30 14:31:38.831] [DEBUG] LibManager - Normalized libs: /Users/kennyp/Lab/git/sponsored-monitoring/node_modules/yahoo-arrow/lib/common/yui-arrow.js [2014-05-30 14:31:38.833] [DEBUG] ArrowSetup - Commandline + Common Libs for Test : [2014-05-30 14:31:38.835] [INFO] ArrowSetup - Glob result: /Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/import-multiple-descriptor.json [2014-05-30 14:31:39.014] [DEBUG] DataProvider - Loading descriptor file: /Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/import-multiple-descriptor.json [2014-05-30 14:31:39.015] [DEBUG] ImportManager - Importing from :/Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/importTests [2014-05-30 14:31:39.015] [ERROR] ImportManager - Error in importing descriptor while processing the descriptor /Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/import-multiple-descriptor.json, Error is:Error: ENOENT, no such file or directory '/Users/kennyp/Lab/git/sponsored-monitoring/Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/importTests/finance-descriptor.json' [2014-05-30 14:31:39.088] [FATAL] DataProvider - Error : /Users/kennyp/Lab/pubgit/kenny-arrow/demo/test/import-multiple-descriptor.json failed Schema Test ! [2014-05-30 14:31:39.088] [INFO] DataProvider - [ { uri: 'urn:uuid:f9fcf6da-71ea-4c39-a445-a1d161432768#/importDescriptor/0', schemaUri: 'urn:uuid:0527e4a2-3d8f-4f78-b854-b5887af7a25d#/properties/importDescriptor/items/0', attribute: 'type', message: 'Instance is not a required type', details: [ 'string' ] }, { uri: 'urn:uuid:f9fcf6da-71ea-4c39-a445-a1d161432768#/importDescriptor/1', schemaUri: 'urn:uuid:0527e4a2-3d8f-4f78-b854-b5887af7a25d#/properties/importDescriptor/items/1', attribute: 'type', message: 'Instance is not a required type', details: [ 'string' ] } ]

kennypeng commented 10 years ago

for the lib file under params, not in scenario, will cause LibManager error. The relative path is wrong. And this PR is also trying to fix this issue.

$ node_modules/yahoo-arrow/index.js --version v0.6.3 $ node_modules/yahoo-arrow/index.js ../kenny-arrow/demo/test/import-multiple-descriptor.json --seleniumHost=http://10.87.232.149:4444/wd/hub --browser=firefox-latest [2014-06-02 16:45:20.329] [INFO] ArrowSetup - Glob result: ../kenny-arrow/demo/test/import-multiple-descriptor.json [2014-06-02 16:45:20.589] [ERROR] LibManager - Error: ENOENT, no such file or directory '/Users/kennyp/Lab/pubgit/kenny-arrow/demo/test-lib.js' [2014-06-02 16:45:20.590] [INFO] TestExecutor - Total test sessions: 3 [2014-06-02 16:45:20.590] [INFO] TestSession - Running test: dom_int [2014-06-02 16:45:20.590] [INFO] TestSession - Using selenium driver

pranavparikh commented 10 years ago

@kenyeah Can you make the demo tests pass ?

kennypeng commented 10 years ago

@pranavparikh done for passing demo tests