testability-driver 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/bin/tdriver-devtools +0 -0
  2. data/config/sut_setup.rb +32 -0
  3. data/config/sut_teardown.rb +32 -0
  4. data/ext/extconf.rb +3 -1
  5. data/lib/tdriver-devtools/behaviour/old/xml/update +0 -0
  6. data/lib/tdriver-devtools/behaviour/xml/generate.rb +0 -0
  7. data/lib/tdriver-devtools/doc/update +0 -0
  8. data/lib/tdriver-devtools/doc/xslt/update +0 -0
  9. data/lib/tdriver-devtools/tdriver-devtools.rb +0 -0
  10. data/lib/tdriver-devtools/tests/feature_tests/output/application_closable_0x3f.feature +10 -0
  11. data/lib/tdriver-devtools/tests/feature_tests/output/application_close.feature +15 -0
  12. data/lib/tdriver-devtools/tests/feature_tests/output/application_environment.feature +10 -0
  13. data/lib/tdriver-devtools/tests/feature_tests/output/application_executable_name.feature +10 -0
  14. data/lib/tdriver-devtools/tests/feature_tests/output/application_uid.feature +10 -0
  15. data/lib/tdriver-devtools/tests/feature_tests/output/created.rid +1 -0
  16. data/lib/tdriver-devtools/tests/feature_tests/output/find_find.feature +15 -0
  17. data/lib/tdriver-devtools/tests/feature_tests/output/flash_behaviour_flash.feature +10 -0
  18. data/lib/tdriver-devtools/tests/feature_tests/output/flash_behaviour_flash_images.feature +15 -0
  19. data/lib/tdriver-devtools/tests/feature_tests/output/sut_application.feature +15 -0
  20. data/lib/tdriver-devtools/tests/feature_tests/output/sut_capture_screen.feature +10 -0
  21. data/lib/tdriver-devtools/tests/feature_tests/output/sut_child.feature +10 -0
  22. data/lib/tdriver-devtools/tests/feature_tests/output/sut_clear_verify_blocks.feature +10 -0
  23. data/lib/tdriver-devtools/tests/feature_tests/output/sut_connect.feature +10 -0
  24. data/lib/tdriver-devtools/tests/feature_tests/output/sut_controller_execution_order.feature +10 -0
  25. data/lib/tdriver-devtools/tests/feature_tests/output/sut_controller_execution_order_0x3d.feature +10 -0
  26. data/lib/tdriver-devtools/tests/feature_tests/output/sut_current_application_id.feature +15 -0
  27. data/lib/tdriver-devtools/tests/feature_tests/output/sut_disconnect.feature +10 -0
  28. data/lib/tdriver-devtools/tests/feature_tests/output/sut_dump_count.feature +15 -0
  29. data/lib/tdriver-devtools/tests/feature_tests/output/sut_freeze.feature +10 -0
  30. data/lib/tdriver-devtools/tests/feature_tests/output/sut_frozen.feature +10 -0
  31. data/lib/tdriver-devtools/tests/feature_tests/output/sut_get_application_id.feature +10 -0
  32. data/lib/tdriver-devtools/tests/feature_tests/output/sut_get_object.feature +10 -0
  33. data/lib/tdriver-devtools/tests/feature_tests/output/sut_get_operator_data.feature +10 -0
  34. data/lib/tdriver-devtools/tests/feature_tests/output/sut_get_ui_dump.feature +15 -0
  35. data/lib/tdriver-devtools/tests/feature_tests/output/sut_get_user_information.feature +10 -0
  36. data/lib/tdriver-devtools/tests/feature_tests/output/sut_input.feature +15 -0
  37. data/lib/tdriver-devtools/tests/feature_tests/output/sut_parameter.feature +15 -0
  38. data/lib/tdriver-devtools/tests/feature_tests/output/sut_press_key.feature +10 -0
  39. data/lib/tdriver-devtools/tests/feature_tests/output/sut_received_data.feature +10 -0
  40. data/lib/tdriver-devtools/tests/feature_tests/output/sut_refresh.feature +20 -0
  41. data/lib/tdriver-devtools/tests/feature_tests/output/sut_refresh_timeout.feature +15 -0
  42. data/lib/tdriver-devtools/tests/feature_tests/output/sut_refresh_tries.feature +15 -0
  43. data/lib/tdriver-devtools/tests/feature_tests/output/sut_refresh_ui_dump.feature +20 -0
  44. data/lib/tdriver-devtools/tests/feature_tests/output/sut_run.feature +10 -0
  45. data/lib/tdriver-devtools/tests/feature_tests/output/sut_sent_data.feature +10 -0
  46. data/lib/tdriver-devtools/tests/feature_tests/output/sut_state.feature +10 -0
  47. data/lib/tdriver-devtools/tests/feature_tests/output/sut_translate.feature +30 -0
  48. data/lib/tdriver-devtools/tests/feature_tests/output/sut_ui_type.feature +10 -0
  49. data/lib/tdriver-devtools/tests/feature_tests/output/sut_ui_version.feature +10 -0
  50. data/lib/tdriver-devtools/tests/feature_tests/output/sut_unfreeze.feature +10 -0
  51. data/lib/tdriver-devtools/tests/feature_tests/output/sut_update.feature +10 -0
  52. data/lib/tdriver-devtools/tests/feature_tests/output/sut_verify_always.feature +20 -0
  53. data/lib/tdriver-devtools/tests/feature_tests/output/sut_verify_blocks.feature +10 -0
  54. data/lib/tdriver-devtools/tests/feature_tests/output/sut_x_path.feature +10 -0
  55. data/lib/tdriver-devtools/tests/feature_tests/output/sut_xml_data.feature +10 -0
  56. data/lib/tdriver-devtools/tests/feature_tests/output/sut_xml_data_0x3d.feature +10 -0
  57. data/lib/tdriver-devtools/tests/feature_tests/output/sut_xml_data_crc.feature +10 -0
  58. data/lib/tdriver-devtools/tests/feature_tests/output/switchbox_behaviour_power_down.feature +10 -0
  59. data/lib/tdriver-devtools/tests/feature_tests/output/switchbox_behaviour_power_status.feature +10 -0
  60. data/lib/tdriver-devtools/tests/feature_tests/output/switchbox_behaviour_power_up.feature +10 -0
  61. data/lib/tdriver-devtools/tests/feature_tests/output/switchbox_behaviour_reset.feature +10 -0
  62. data/lib/tdriver-devtools/tests/feature_tests/output/verification_test_object_exists_0x3f.feature +15 -0
  63. data/lib/tdriver-devtools/tests/feature_tests/update +0 -0
  64. data/lib/tdriver/base/behaviour/behaviours/object_composition.rb +4 -4
  65. data/lib/tdriver/base/behaviour/factory.rb +8 -0
  66. data/lib/tdriver/base/sut/generic/behaviours/application.rb +24 -3
  67. data/lib/tdriver/base/sut/generic/behaviours/sut.rb +465 -354
  68. data/lib/tdriver/base/test_object/adapter.rb +2 -2
  69. data/lib/tdriver/base/test_object/behaviours/test_object.rb +22 -5
  70. data/lib/tdriver/base/test_object/cache.rb +1 -1
  71. data/lib/tdriver/base/test_object/factory.rb +23 -3
  72. data/lib/tdriver/env.rb +0 -0
  73. data/lib/tdriver/loader.rb +0 -0
  74. data/lib/tdriver/matti.rb +0 -0
  75. data/lib/tdriver/report/error_recovery/tdriver_error_recovery.rb +22 -24
  76. data/lib/tdriver/report/report.rb +8 -1
  77. data/lib/tdriver/report/report_api.rb +18 -0
  78. data/lib/tdriver/report/report_combine.rb +1 -1
  79. data/lib/tdriver/report/report_creator.rb +5 -1
  80. data/lib/tdriver/report/report_execution_statistics.rb +105 -78
  81. data/lib/tdriver/report/report_test_case_run.rb +2 -1
  82. data/lib/tdriver/report/report_test_run.rb +187 -116
  83. data/lib/tdriver/report/report_writer.rb +49 -29
  84. data/lib/tdriver/tdriver.rb +14 -3
  85. data/lib/tdriver/util/common/exception.rb +53 -0
  86. data/lib/tdriver/util/common/hash.rb +79 -23
  87. data/lib/tdriver/util/common/numeric.rb +26 -5
  88. data/lib/tdriver/util/common/object.rb +44 -15
  89. data/lib/tdriver/util/common/string.rb +4 -1
  90. data/lib/tdriver/util/filters/dynamic_attributes.rb +2 -1
  91. data/lib/tdriver/util/keymap/keymap.rb +81 -0
  92. data/lib/tdriver/util/loader.rb +4 -1
  93. data/lib/tdriver/util/logger/logger.rb +17 -9
  94. data/lib/tdriver/util/other/config.rb +0 -0
  95. data/lib/tdriver/util/parameter/error.rb +3 -0
  96. data/lib/tdriver/util/parameter/loader.rb +6 -1
  97. data/lib/tdriver/util/parameter/parameter.rb +87 -14
  98. data/lib/tdriver/util/parameter/parameter_new.rb +869 -0
  99. data/lib/tdriver/util/parameter/parameter_template.rb +2 -2
  100. data/lib/tdriver/util/parameter/parameter_user_api.rb +27 -3
  101. data/lib/tdriver/util/parameter/parameter_xml.rb +36 -38
  102. data/lib/tdriver/version.rb +1 -1
  103. data/xml/templates/generic.xml +4 -10
  104. metadata +196 -138
@@ -0,0 +1,15 @@
1
+ Feature: MobyBehaviour::SUT#parameter
2
+ As a test scripter writer
3
+ I want to use parameter method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing parameter method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].parameter()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing parameter method with optional argument 'arguments' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].parameter(arguments)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#press_key
2
+ As a test scripter writer
3
+ I want to use press_key method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing press_key method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].press_key(value)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#received_data
2
+ As a test scripter writer
3
+ I want to use received_data method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing received_data method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].received_data()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,20 @@
1
+ Feature: MobyBehaviour::SUT#refresh
2
+ As a test scripter writer
3
+ I want to use refresh method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing refresh method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].refresh()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing refresh method with optional argument 'refresh_args' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].refresh(refresh_args)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
16
+ Scenario: Testing refresh method with optional argument 'creation_attributes' (Rename this to be more descriptive)
17
+ Given I launch application [APPLICATION_NAME] as @app
18
+ When I execute "@app.[SOME_OBJECT].refresh(refresh_args, creation_attributes)"
19
+ Then [ADD_YOUR_VERIFICATION_HERE]
20
+
@@ -0,0 +1,15 @@
1
+ Feature: MobyBehaviour::SUT#refresh_timeout=
2
+ As a test scripter writer
3
+ I want to use refresh_timeout attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing refresh_timeout attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].refresh_timeout"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing refresh_timeout= attribute (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].refresh_timeout="
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
@@ -0,0 +1,15 @@
1
+ Feature: MobyBehaviour::SUT#refresh_tries=
2
+ As a test scripter writer
3
+ I want to use refresh_tries attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing refresh_tries attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].refresh_tries"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing refresh_tries= attribute (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].refresh_tries="
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
@@ -0,0 +1,20 @@
1
+ Feature: MobyBehaviour::SUT#refresh_ui_dump
2
+ As a test scripter writer
3
+ I want to use refresh_ui_dump method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing refresh_ui_dump method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].refresh_ui_dump()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing refresh_ui_dump method with optional argument 'refresh_args' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].refresh_ui_dump(refresh_args)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
16
+ Scenario: Testing refresh_ui_dump method with optional argument 'creation_attributes' (Rename this to be more descriptive)
17
+ Given I launch application [APPLICATION_NAME] as @app
18
+ When I execute "@app.[SOME_OBJECT].refresh_ui_dump(refresh_args, creation_attributes)"
19
+ Then [ADD_YOUR_VERIFICATION_HERE]
20
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#run
2
+ As a test scripter writer
3
+ I want to use run method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing run method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].run(target)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#sent_data
2
+ As a test scripter writer
3
+ I want to use sent_data method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing sent_data method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].sent_data()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#state
2
+ As a test scripter writer
3
+ I want to use state method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing state method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].state()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,30 @@
1
+ Feature: MobyBehaviour::SUT#translate
2
+ As a test scripter writer
3
+ I want to use translate method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing translate method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].translate(logical_name)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing translate method with optional argument 'file_name' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].translate(logical_name, file_name)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
16
+ Scenario: Testing translate method with optional argument 'plurality' (Rename this to be more descriptive)
17
+ Given I launch application [APPLICATION_NAME] as @app
18
+ When I execute "@app.[SOME_OBJECT].translate(logical_name, file_name, plurality)"
19
+ Then [ADD_YOUR_VERIFICATION_HERE]
20
+
21
+ Scenario: Testing translate method with optional argument 'numerus' (Rename this to be more descriptive)
22
+ Given I launch application [APPLICATION_NAME] as @app
23
+ When I execute "@app.[SOME_OBJECT].translate(logical_name, file_name, plurality, numerus)"
24
+ Then [ADD_YOUR_VERIFICATION_HERE]
25
+
26
+ Scenario: Testing translate method with optional argument 'lengthvariant' (Rename this to be more descriptive)
27
+ Given I launch application [APPLICATION_NAME] as @app
28
+ When I execute "@app.[SOME_OBJECT].translate(logical_name, file_name, plurality, numerus, lengthvariant)"
29
+ Then [ADD_YOUR_VERIFICATION_HERE]
30
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#ui_type
2
+ As a test scripter writer
3
+ I want to use ui_type attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing ui_type attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].ui_type"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#ui_version
2
+ As a test scripter writer
3
+ I want to use ui_version attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing ui_version attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].ui_version"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#unfreeze
2
+ As a test scripter writer
3
+ I want to use unfreeze method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing unfreeze method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].unfreeze()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#update
2
+ As a test scripter writer
3
+ I want to use update method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing update method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].update()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,20 @@
1
+ Feature: MobyBehaviour::SUT#verify_always
2
+ As a test scripter writer
3
+ I want to use verify_always method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing verify_always method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].verify_always(expected)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing verify_always method with optional argument 'message' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].verify_always(expected, message)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
16
+ Scenario: Testing verify_always method with optional argument 'block' (Rename this to be more descriptive)
17
+ Given I launch application [APPLICATION_NAME] as @app
18
+ When I execute "@app.[SOME_OBJECT].verify_always(expected, message, block)"
19
+ Then [ADD_YOUR_VERIFICATION_HERE]
20
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#verify_blocks
2
+ As a test scripter writer
3
+ I want to use verify_blocks attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing verify_blocks attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].verify_blocks"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#x_path
2
+ As a test scripter writer
3
+ I want to use x_path attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing x_path attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].x_path"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#xml_data
2
+ As a test scripter writer
3
+ I want to use xml_data attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing xml_data attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].xml_data"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#xml_data=
2
+ As a test scripter writer
3
+ I want to use xml_data= method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing xml_data= method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].xml_data=(xml)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SUT#xml_data_crc
2
+ As a test scripter writer
3
+ I want to use xml_data_crc attribute to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SUT behaviour
5
+
6
+ Scenario: Testing xml_data_crc attribute (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].xml_data_crc"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SwitchboxBehaviour#power_down
2
+ As a test scripter writer
3
+ I want to use power_down method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SwitchboxBehaviour behaviour
5
+
6
+ Scenario: Testing power_down method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].power_down()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SwitchboxBehaviour#power_status
2
+ As a test scripter writer
3
+ I want to use power_status method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SwitchboxBehaviour behaviour
5
+
6
+ Scenario: Testing power_status method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].power_status()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SwitchboxBehaviour#power_up
2
+ As a test scripter writer
3
+ I want to use power_up method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SwitchboxBehaviour behaviour
5
+
6
+ Scenario: Testing power_up method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].power_up()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,10 @@
1
+ Feature: MobyBehaviour::SwitchboxBehaviour#reset
2
+ As a test scripter writer
3
+ I want to use reset method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::SwitchboxBehaviour behaviour
5
+
6
+ Scenario: Testing reset method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].reset()"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
@@ -0,0 +1,15 @@
1
+ Feature: MobyBehaviour::Verification#test_object_exists?
2
+ As a test scripter writer
3
+ I want to use test_object_exists? method to [DO_SOMETHING] in [TARGET_APPLICATION]
4
+ so that I can test the MobyBehaviour::Verification behaviour
5
+
6
+ Scenario: Testing test_object_exists? method with required argument(s) (Rename this to be more descriptive)
7
+ Given I launch application [APPLICATION_NAME] as @app
8
+ When I execute "@app.[SOME_OBJECT].test_object_exists?(type)"
9
+ Then [ADD_YOUR_VERIFICATION_HERE]
10
+
11
+ Scenario: Testing test_object_exists? method with optional argument 'attributes' (Rename this to be more descriptive)
12
+ Given I launch application [APPLICATION_NAME] as @app
13
+ When I execute "@app.[SOME_OBJECT].test_object_exists?(type, attributes)"
14
+ Then [ADD_YOUR_VERIFICATION_HERE]
15
+
File without changes
@@ -61,7 +61,7 @@ module MobyBehaviour
61
61
  # === raises
62
62
  def add_parent( parent_object )
63
63
 
64
- warn("Warning: Deprecated method, use store to @parent instead of using this method")
64
+ warn("warning: Deprecated method, use store to @parent instead of using this method")
65
65
 
66
66
  @parent = parent_object
67
67
 
@@ -75,7 +75,7 @@ module MobyBehaviour
75
75
  # ?
76
76
  def remove_parent()
77
77
 
78
- warn("Warning: Deprecated method, set @parent to nil instead of using this method")
78
+ warn("warning: Deprecated method, set @parent to nil instead of using this method")
79
79
 
80
80
  @parent = nil
81
81
 
@@ -90,7 +90,7 @@ module MobyBehaviour
90
90
  # === raises
91
91
  def add_child( new_child_object )
92
92
 
93
- warn("Warning: Deprecated method, use @child_object_cache.add_object instead of this method")
93
+ warn("warning: Deprecated method, use @child_object_cache.add_object instead of this method")
94
94
 
95
95
  @_child_object_cache.merge!( new_child_object.hash => new_child_object )
96
96
 
@@ -105,7 +105,7 @@ module MobyBehaviour
105
105
  # === raises
106
106
  def remove_child( target_child_object )
107
107
 
108
- warn("Warning: Deprecated method, use @child_object_cache.add_object instead of this method")
108
+ warn("warning: Deprecated method, use @child_object_cache.add_object instead of this method")
109
109
 
110
110
  @_child_object_cache.delete( target_child_object.hash )
111
111
 
@@ -112,6 +112,14 @@ module MobyBase
112
112
  end
113
113
 
114
114
  end
115
+
116
+ # TODO: document me
117
+ def reset_modules_cache
118
+
119
+ # reset modules cache hash; needed if new behaviour plugins loaded later than when initializing TDriver/SUT
120
+ @@modules_cache.clear
121
+
122
+ end
115
123
 
116
124
  def apply_behaviour!( rules = {} )
117
125
 
@@ -162,15 +162,19 @@ module MobyBehaviour
162
162
  end
163
163
 
164
164
  # Disable logging
165
- $logger.enabled = false if ( original_logger_state = $logger.enabled )
165
+ original_logger_state = $logger.enabled
166
+ $logger.enabled = false
166
167
 
167
168
  # verify close results
169
+ # store start time
170
+ start_time = Time.now
171
+ timeout_time = $parameters[ self.sut.id ][ :application_synchronization_timeout, '60' ].to_f
168
172
  begin
169
173
 
170
174
  application_identification_hash = { :type => 'application', :id => @id }
171
175
 
172
176
  MobyUtil::Retryable.until(
173
- :timeout => $parameters[ self.sut.id ][ :application_synchronization_timeout, '60' ].to_f,
177
+ :timeout => timeout_time,
174
178
  :interval => $parameters[ self.sut.id ][ :application_synchronization_retry_interval, '0.25' ].to_f,
175
179
  :exception => MobyBase::VerificationError,
176
180
  :unless => [MobyBase::TestObjectNotFoundError, MobyBase::ApplicationNotAvailableError] ) {
@@ -185,7 +189,7 @@ module MobyBehaviour
185
189
  if ( close_options[ :check_process ] == true )
186
190
 
187
191
  # the application did not close
188
- raise MobyBase::VerificationError.new, "Verification of close failed. The application that was to be closed is still running." if matches.count > 0
192
+ raise MobyBase::VerificationError.new, "Verification of close failed. The application that was to be closed is still running." if matches.count > 0 && (Time.now - start_time) >= timeout_time
189
193
 
190
194
  elsif ( close_options[ :check_process ] == false )
191
195
 
@@ -359,6 +363,23 @@ module MobyBehaviour
359
363
 
360
364
  end
361
365
 
366
+ # == description
367
+ # Returns the mem usage of the application if the information is available.
368
+ # Will return -1 if the information is not available.
369
+ #
370
+ # == returns
371
+ # Integer
372
+ # description: Current memory usage
373
+ # example: 124354
374
+ #
375
+ def mem_usage
376
+ mem = -1
377
+ begin
378
+ mem = self.attribute('memUsage')
379
+ rescue
380
+ end
381
+ mem
382
+ end
362
383
 
363
384
 
364
385
  # enable hooking for performance measurement & debug logging