summaryrefslogtreecommitdiffstats
path: root/cvp/3rd_party/static/testapi-ui/components
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2017-11-16 09:18:14 +0000
committerLeo wang <grakiss.wanglei@huawei.com>2017-11-27 08:12:11 +0000
commit25e6fc8a5bc2cae8a062076ca460348835846d0a (patch)
tree279aa31975709698463aa65b2fa1fb3d032eb3ea /cvp/3rd_party/static/testapi-ui/components
parentffe419bf63938be76af7e57ee782ae928a7391f7 (diff)
[cvp-web] Bugfix: Total num of test cases should be fixed
JIRA: DOVETAIL-552 The total num of test cases is decided by the number of the test cases users uploaded to the Web now. The total num should be fixed. For example, the total num of mandatory test cases should be 215. The total num of optional test cases should be 63. Change-Id: I6f7055bbeceb80f831af7d800b1a5aca4e165c45 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/components')
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/results-report/data/testcases.json509
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html36
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/results-report/resultsReport.html37
-rw-r--r--cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js240
4 files changed, 680 insertions, 142 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/components/results-report/data/testcases.json b/cvp/3rd_party/static/testapi-ui/components/results-report/data/testcases.json
new file mode 100644
index 00000000..858aea63
--- /dev/null
+++ b/cvp/3rd_party/static/testapi-ui/components/results-report/data/testcases.json
@@ -0,0 +1,509 @@
+{
+ "mandatory": {
+ "dovetail.ha.tc001": {
+ "cases": [
+ "opnfv_yardstick_tc019"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc002": {
+ "cases": [
+ "opnfv_yardstick_tc045"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc003": {
+ "cases": [
+ "opnfv_yardstick_tc046"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc004": {
+ "cases": [
+ "opnfv_yardstick_tc047"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc005": {
+ "cases": [
+ "opnfv_yardstick_tc048"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc006": {
+ "cases": [
+ "opnfv_yardstick_tc051"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc007": {
+ "cases": [
+ "opnfv_yardstick_tc052"
+ ],
+ "total": 1
+ },
+ "dovetail.ha.tc008": {
+ "cases": [
+ "opnfv_yardstick_tc053"
+ ],
+ "total": 1
+ },
+ "dovetail.osinterop.tc001": {
+ "cases": [
+ "tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_delete_image",
+ "tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_image_specify_multibyte_character_image_name",
+ "tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers",
+ "tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers_with_detail",
+ "tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_server_details",
+ "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers",
+ "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers_with_detail",
+ "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details",
+ "tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON.test_get_instance_action",
+ "tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON.test_list_instance_actions",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_flavor",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_image",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_server_name",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_server_status",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_limit_results",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_active_status",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_flavor",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_image",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_limit",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_server_name",
+ "tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_name_wildcard",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_changes_since_future_date",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_changes_since_invalid_date",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_greater_than_actual_count",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_pass_negative_value",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_pass_string",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_flavor",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_image",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_server_name",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_detail_server_is_deleted",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_status_non_existing",
+ "tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_with_a_deleted_server",
+ "tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_lock_unlock_server",
+ "tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_stop_start_server",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_delete_server_metadata_item",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_get_server_metadata_item",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_list_server_metadata",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_set_server_metadata",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_set_server_metadata_item",
+ "tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_update_server_metadata",
+ "tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_server_with_admin_password",
+ "tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_specify_keypair",
+ "tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_with_existing_server_name",
+ "tempest.api.compute.servers.test_servers.ServersTestJSON.test_update_access_server_address",
+ "tempest.api.compute.servers.test_servers.ServersTestJSON.test_update_server_name",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_numeric_server_name",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_server_metadata_exceeds_length_limit",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_server_name_length_exceeds_256",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_flavor",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_image",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_network_uuid",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_delete_server_pass_id_exceeding_length_limit",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_delete_server_pass_negative_id",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_get_non_existent_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_invalid_ip_v6_address",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_reboot_non_existent_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_rebuild_deleted_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_rebuild_non_existent_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_server_name_blank",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_stop_non_existent_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_name_of_non_existent_server",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_server_name_length_exceeds_256",
+ "tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_server_set_empty_name",
+ "tempest.api.compute.test_quotas.QuotasTestJSON.test_get_default_quotas",
+ "tempest.api.compute.test_quotas.QuotasTestJSON.test_get_quotas",
+ "tempest.api.compute.test_versions.TestVersions.test_list_api_versions",
+ "tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_list_get_volume_attachments",
+ "tempest.api.identity.v3.test_api_discovery.TestApiDiscovery.test_api_media_types",
+ "tempest.api.identity.v3.test_api_discovery.TestApiDiscovery.test_api_version_resources",
+ "tempest.api.identity.v3.test_api_discovery.TestApiDiscovery.test_api_version_statuses",
+ "tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token",
+ "tempest.api.image.v2.test_images.BasicOperationsImagesTest.test_delete_image",
+ "tempest.api.image.v2.test_images.BasicOperationsImagesTest.test_update_image",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_get_image_schema",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_get_images_schema",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_container_format",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_disk_format",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_limit",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_min_max_size",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_size",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_status",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_images_param_visibility",
+ "tempest.api.image.v2.test_images.ListUserImagesTest.test_list_no_params",
+ "tempest.api.image.v2.test_images_negative.ImagesNegativeTest.test_delete_image_null_id",
+ "tempest.api.image.v2.test_images_negative.ImagesNegativeTest.test_delete_non_existing_image",
+ "tempest.api.image.v2.test_images_negative.ImagesNegativeTest.test_get_delete_deleted_image",
+ "tempest.api.image.v2.test_images_negative.ImagesNegativeTest.test_get_image_null_id",
+ "tempest.api.image.v2.test_images_negative.ImagesNegativeTest.test_get_non_existent_image",
+ "tempest.api.image.v2.test_images_tags.ImagesTagsTest.test_update_delete_tags_for_image",
+ "tempest.api.image.v2.test_images_tags_negative.ImagesTagsNegativeTest.test_delete_non_existing_tag",
+ "tempest.api.image.v2.test_images_tags_negative.ImagesTagsNegativeTest.test_update_tags_for_non_existing_image",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_all_attributes",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_with_allocation_pools",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_with_dhcp_enabled",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_with_gw",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_with_gw_and_allocation_pools",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_with_host_routes_and_dns_nameservers",
+ "tempest.api.network.test_networks.NetworksTest.test_create_delete_subnet_without_gateway",
+ "tempest.api.network.test_networks.NetworksTest.test_create_update_delete_network_subnet",
+ "tempest.api.network.test_networks.NetworksTest.test_delete_network_with_subnet",
+ "tempest.api.network.test_networks.NetworksTest.test_list_networks",
+ "tempest.api.network.test_networks.NetworksTest.test_list_networks_fields",
+ "tempest.api.network.test_networks.NetworksTest.test_list_subnets",
+ "tempest.api.network.test_networks.NetworksTest.test_list_subnets_fields",
+ "tempest.api.network.test_networks.NetworksTest.test_show_network",
+ "tempest.api.network.test_networks.NetworksTest.test_show_network_fields",
+ "tempest.api.network.test_networks.NetworksTest.test_show_subnet",
+ "tempest.api.network.test_networks.NetworksTest.test_show_subnet_fields",
+ "tempest.api.network.test_networks.NetworksTest.test_update_subnet_gw_dns_host_routes_dhcp",
+ "tempest.api.network.test_ports.PortsTestJSON.test_create_bulk_port",
+ "tempest.api.network.test_ports.PortsTestJSON.test_create_port_in_allowed_allocation_pools",
+ "tempest.api.network.test_ports.PortsTestJSON.test_create_update_delete_port",
+ "tempest.api.network.test_ports.PortsTestJSON.test_list_ports",
+ "tempest.api.network.test_ports.PortsTestJSON.test_list_ports_fields",
+ "tempest.api.network.test_ports.PortsTestJSON.test_show_port",
+ "tempest.api.network.test_ports.PortsTestJSON.test_show_port_fields",
+ "tempest.api.network.test_ports.PortsTestJSON.test_update_port_with_security_group_and_extra_attributes",
+ "tempest.api.network.test_ports.PortsTestJSON.test_update_port_with_two_security_groups_and_extra_attributes",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_list_update_show_delete_security_group",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_security_group_rule_with_additional_args",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_security_group_rule_with_icmp_type_code",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_security_group_rule_with_protocol_integer_value",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_security_group_rule_with_remote_group_id",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_security_group_rule_with_remote_ip_prefix",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_create_show_delete_security_group_rule",
+ "tempest.api.network.test_security_groups.SecGroupTest.test_list_security_groups",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_additional_default_security_group_fails",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_duplicate_security_group_rule_fails",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_bad_ethertype",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_bad_protocol",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_bad_remote_ip_prefix",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_invalid_ports",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_non_existent_remote_groupid",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_create_security_group_rule_with_non_existent_security_group",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_delete_non_existent_security_group",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_show_non_existent_security_group",
+ "tempest.api.network.test_security_groups_negative.NegativeSecGroupTest.test_show_non_existent_security_group_rule",
+ "tempest.api.volume.test_availability_zone.AvailabilityZoneV2TestJSON.test_get_availability_zone_list",
+ "tempest.api.volume.test_extensions.ExtensionsV2TestJSON.test_list_extensions",
+ "tempest.api.volume.test_snapshot_metadata.SnapshotV2MetadataTestJSON.test_crud_snapshot_metadata",
+ "tempest.api.volume.test_snapshot_metadata.SnapshotV2MetadataTestJSON.test_update_snapshot_metadata_item",
+ "tempest.api.volume.test_volume_metadata.VolumesV2MetadataTest.test_crud_volume_metadata",
+ "tempest.api.volume.test_volume_metadata.VolumesV2MetadataTest.test_update_volume_metadata_item",
+ "tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest.test_attach_detach_volume_to_instance",
+ "tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest.test_get_volume_attachment",
+ "tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest.test_reserve_unreserve_volume",
+ "tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest.test_volume_bootable",
+ "tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest.test_volume_readonly_update",
+ "tempest.api.volume.test_volumes_get.VolumesV2GetTest.test_volume_create_get_update_delete",
+ "tempest.api.volume.test_volumes_get.VolumesV2GetTest.test_volume_create_get_update_delete_as_clone",
+ "tempest.api.volume.test_volumes_get.VolumesV2GetTest.test_volume_create_get_update_delete_from_image",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_by_name",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_details_by_name",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_param_display_name_and_status",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_with_detail_param_display_name_and_status",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_with_detail_param_metadata",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_with_details",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_with_param_metadata",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volumes_list_by_availability_zone",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volumes_list_by_status",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volumes_list_details_by_availability_zone",
+ "tempest.api.volume.test_volumes_list.VolumesV2ListTestJSON.test_volumes_list_details_by_status",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_attach_volumes_with_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_invalid_size",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_nonexistent_snapshot_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_nonexistent_source_volid",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_nonexistent_volume_type",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_size_negative",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_with_size_zero",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_create_volume_without_passing_size",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_delete_invalid_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_delete_volume_without_passing_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_detach_volumes_with_invalid_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_get_invalid_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_get_volume_without_passing_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_list_volumes_detail_with_invalid_status",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_list_volumes_detail_with_nonexistent_name",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_list_volumes_with_invalid_status",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_list_volumes_with_nonexistent_name",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_reserve_volume_with_negative_volume_status",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_reserve_volume_with_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_unreserve_volume_with_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_update_volume_with_empty_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_update_volume_with_invalid_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_update_volume_with_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_volume_delete_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_negative.VolumesV2NegativeTest.test_volume_get_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_snapshots.VolumesV2SnapshotTestJSON.test_snapshot_create_get_list_update_delete",
+ "tempest.api.volume.test_volumes_snapshots.VolumesV2SnapshotTestJSON.test_volume_from_snapshot",
+ "tempest.api.volume.test_volumes_snapshots_list.VolumesV2SnapshotListTestJSON.test_snapshots_list_details_with_params",
+ "tempest.api.volume.test_volumes_snapshots_list.VolumesV2SnapshotListTestJSON.test_snapshots_list_with_params",
+ "tempest.api.volume.test_volumes_snapshots_negative.VolumesV2SnapshotNegativeTestJSON.test_create_snapshot_with_nonexistent_volume_id",
+ "tempest.api.volume.test_volumes_snapshots_negative.VolumesV2SnapshotNegativeTestJSON.test_create_snapshot_without_passing_volume_id",
+ "tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_details_pagination",
+ "tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_details_with_multiple_params",
+ "tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_pagination",
+ "tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name",
+ "tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_created_server_vcpus",
+ "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_host_name_is_same_as_server_name",
+ "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_created_server_vcpus",
+ "tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard",
+ "tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_rebuild_server",
+ "tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_attach_detach_volume"
+ ],
+ "total": 205
+ },
+ "dovetail.vping.tc001": {
+ "cases": [
+ "vping_userdata"
+ ],
+ "total": 1
+ },
+ "dovetail.vping.tc002": {
+ "cases": [
+ "vping_ssh"
+ ],
+ "total": 1
+ }
+ },
+ "optional": {
+ "dovetail.ipv6.tc001": {
+ "cases": [
+ "tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_network",
+ "tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_port",
+ "tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_subnet"
+ ],
+ "total": 3
+ },
+ "dovetail.ipv6.tc002": {
+ "cases": [
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_create_update_delete_network_subnet"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc003": {
+ "cases": [
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_external_network_visibility"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc004": {
+ "cases": [
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_list_networks",
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_list_subnets"
+ ],
+ "total": 2
+ },
+ "dovetail.ipv6.tc005": {
+ "cases": [
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_show_network",
+ "tempest.api.network.test_networks.NetworksIpV6Test.test_show_subnet"
+ ],
+ "total": 2
+ },
+ "dovetail.ipv6.tc006": {
+ "cases": [
+ "tempest.api.network.test_ports.PortsIpV6TestJSON.test_create_port_in_allowed_allocation_pools"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc007": {
+ "cases": [
+ "tempest.api.network.test_ports.PortsIpV6TestJSON.test_create_port_with_no_securitygroups"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc008": {
+ "cases": [
+ "tempest.api.network.test_ports.PortsIpV6TestJSON.test_create_update_delete_port"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc009": {
+ "cases": [
+ "tempest.api.network.test_ports.PortsIpV6TestJSON.test_list_ports"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc010": {
+ "cases": [
+ "tempest.api.network.test_ports.PortsIpV6TestJSON.test_show_port"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc011": {
+ "cases": [
+ "tempest.api.network.test_routers.RoutersIpV6Test.test_add_multiple_router_interfaces"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc012": {
+ "cases": [
+ "tempest.api.network.test_routers.RoutersIpV6Test.test_add_remove_router_interface_with_port_id"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc013": {
+ "cases": [
+ "tempest.api.network.test_routers.RoutersIpV6Test.test_add_remove_router_interface_with_subnet_id"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc014": {
+ "cases": [
+ "tempest.api.network.test_routers.RoutersIpV6Test.test_create_show_list_update_delete_router"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc015": {
+ "cases": [
+ "tempest.api.network.test_security_groups.SecGroupIPv6Test.test_create_list_update_show_delete_security_group"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc016": {
+ "cases": [
+ "tempest.api.network.test_security_groups.SecGroupIPv6Test.test_create_show_delete_security_group_rule"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc017": {
+ "cases": [
+ "tempest.api.network.test_security_groups.SecGroupIPv6Test.test_list_security_groups"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc018": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_dhcp6_stateless_from_os"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc019": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_dhcp6_stateless_from_os"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc020": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_multi_prefix_dhcpv6_stateless"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc021": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_multi_prefix_dhcpv6_stateless"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc022": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_slaac_from_os"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc023": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_slaac_from_os"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc024": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_multi_prefix_slaac"
+ ],
+ "total": 1
+ },
+ "dovetail.ipv6.tc025": {
+ "cases": [
+ "tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_multi_prefix_slaac"
+ ],
+ "total": 1
+ },
+ "dovetail.sdnvpn.tc001": {
+ "cases": [
+ "functest_testcase_1"
+ ],
+ "total": 1
+ },
+ "dovetail.sdnvpn.tc002": {
+ "cases": [
+ "functest_testcase_2"
+ ],
+ "total": 1
+ },
+ "dovetail.sdnvpn.tc004": {
+ "cases": [
+ "functest_testcase_4"
+ ],
+ "total": 1
+ },
+ "dovetail.sdnvpn.tc008": {
+ "cases": [
+ "functest_testcase_8"
+ ],
+ "total": 1
+ },
+ "dovetail.tempest.tc001": {
+ "cases": [
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_mtu_sized_frames"
+ ],
+ "total": 1
+ },
+ "dovetail.tempest.tc002": {
+ "cases": [
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_port_security_macspoofing_port",
+ "tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_cross_tenant_traffic",
+ "tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_in_tenant_traffic",
+ "tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_multiple_security_groups",
+ "tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_port_security_disable_security_group",
+ "tempest.scenario.test_security_groups_basic_ops.TestSecurityGroupsBasicOps.test_port_update_new_security_group"
+ ],
+ "total": 6
+ },
+ "dovetail.tempest.tc003": {
+ "cases": [
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_hotplug_nic",
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops",
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_subnet_details",
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_update_instance_port_admin_state",
+ "tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_update_router_admin_state"
+ ],
+ "total": 5
+ },
+ "dovetail.tempest.tc004": {
+ "cases": [
+ "tempest.scenario.test_minimum_basic.TestMinimumBasicScenario.test_minimum_basic_scenario",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_cold_migration",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_pause_unpause",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_reboot",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_rebuild",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_resize",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_stop_start",
+ "tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_suspend_resume",
+ "tempest.scenario.test_server_advanced_ops.TestServerAdvancedOps.test_resize_volume_backed_server_confirm",
+ "tempest.scenario.test_server_advanced_ops.TestServerAdvancedOps.test_server_sequence_suspend_resume",
+ "tempest.scenario.test_shelve_instance.TestShelveInstance.test_shelve_instance",
+ "tempest.scenario.test_shelve_instance.TestShelveInstance.test_shelve_volume_backed_instance"
+ ],
+ "total": 12
+ },
+ "dovetail.tempest.tc005": {
+ "cases": [
+ "tempest.scenario.test_server_multinode.TestServerMultinode.test_schedule_to_all_nodes",
+ "tempest.api.compute.servers.test_server_group.ServerGroupTestJSON.test_create_delete_multiple_server_groups_with_same_name_policy",
+ "tempest.api.compute.servers.test_server_group.ServerGroupTestJSON.test_create_delete_server_group_with_affinity_policy",
+ "tempest.api.compute.servers.test_server_group.ServerGroupTestJSON.test_create_delete_server_group_with_anti_affinity_policy",
+ "tempest.api.compute.servers.test_server_group.ServerGroupTestJSON.test_list_server_groups",
+ "tempest.api.compute.servers.test_server_group.ServerGroupTestJSON.test_show_server_group"
+ ],
+ "total": 6
+ }
+ }
+}
diff --git a/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html b/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
index f79ac713..7dc43964 100644
--- a/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
+++ b/cvp/3rd_party/static/testapi-ui/components/results-report/partials/reportDetails.html
@@ -25,37 +25,27 @@ Test Filters:<br />
</div>
</div>
-<uib-accordion-group is-open="isOpen" is-disabled="ctrl.cases == 0">
+<uib-accordion-group ng-repeat="(type,data) in ctrl.data" is-open="isOpen">
<uib-accordion-heading>
- Test ID: {{ ctrl.testId }}
+ {{ type }}: (Total: 3 test areas, {{ ctrl.statistics[type].total }} tests)
<i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': isOpen, 'glyphicon-chevron-right': !isOpen}"></i>
</uib-accordion-heading>
<ol class="capabilities">
- <li ng-repeat="testcase in ctrl.cases" ng-show="(ctrl.testStatus == 'passed' && testcase.pass != 0) || (ctrl.testStatus == 'not passed' && testcase.fail != 0) || ctrl.testStatus == 'total'">
+ <li ng-repeat="(area, value) in data" ng-show="(ctrl.testStatus == 'passed' && value.pass != 0) || (ctrl.testStatus == 'not passed' && value.fail != 0) || ctrl.testStatus == 'total'">
- <a ng-click="testcase.folder = !testcase.folder">
- {{ testcase.build_tag.split('-').pop() }}
- <span ng-if="ctrl.testStatus == 'total'" ng-class="{'text-success': testcase.total == testcase.pass, 'text-warning': (testcase.pass < testcase.total && testcase.pass > 0), 'text-danger': testcase.pass == 0}">[{{ testcase.pass }}/{{ testcase.total }}]</span>
- <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ testcase.pass }}]</span>
- <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ testcase.fail }}]</span>
+ <a ng-click="value.folder = !value.folder">
+ {{ area }}
+ <span ng-if="ctrl.testStatus == 'total'" ng-class="{'text-success': value.total == value.pass, 'text-warning': (value.pass < value.total && value.pass > 0), 'text-danger': value.pass == 0}">[{{ value.pass }}/{{ value.total }}]</span>
+ <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ value.pass }}]</span>
+ <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ value.fail }}]</span>
</a>
- <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(testcase.build_tag.split('-').pop())"><span class="glyphicon glyphicon-cog"></a>
- <ul class="list-unstyled" uib-collapse="testcase.folder">
- <li ng-if="!testcase.details.success">
- <span ng-class="{'glyphicon glyphicon-ok text-success':testcase.criteria == 'PASS'}" aria-hidden="true"></span>
- <span ng-class="{'glyphicon glyphicon-remove text-warning':testcase.criteria != 'PASS'}"></span>
- {{ testcase.case_name }}
+ <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(area)"><span class="glyphicon glyphicon-cog"></a>
+ <ul class="list-unstyled" uib-collapse="value.folder">
+ <li ng-repeat="case in value.cases">
+ <span ng-class="{'glyphicon glyphicon-ok text-success':ctrl.case_list.indexOf(case) > -1, 'glyphicon glyphicon-remove text-warning':ctrl.case_list.indexOf(case) == -1}" aria-hidden="true"></span>
+ <a ng-click="ctrl.gotoDoc(case)">{{ case }}</a>
</li>
- <li ng-repeat="sub in testcase.details.success" ng-if="testcase.details.success && ctrl.testStatus != 'not passed'">
- <span class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>
- <a ng-click="ctrl.gotoDoc(sub)">{{ sub }}</a>
- </li>
-
- <li ng-repeat="sub in testcase.details.errors" ng-if="testcase.details.errors && ctrl.testStatus != 'passed'">
- <span class="glyphicon glyphicon-remove text-warning"></span>
- <a ng-click="ctrl.gotoDoc(sub)">{{ sub }}</a>
- </li>
</ul>
</li>
</ol>
diff --git a/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReport.html b/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReport.html
index 537a3460..a9753c3c 100644
--- a/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReport.html
+++ b/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReport.html
@@ -10,27 +10,22 @@
</div>
</div>
-<strong>Total: {{ctrl.total}}, Pass: {{ ctrl.mandatory_pass + ctrl.optional_pass }}, Rate: {{ (ctrl.mandatory_pass + ctrl.optional_pass) / ctrl.total * 100 | number:2 }}%</strong></br>
-<strong>Mandatory Total: {{ctrl.mandatory_total}}, Pass: {{ ctrl.mandatory_pass }}, Rate: {{ ctrl.mandatory_pass / ctrl.mandatory_total * 100 | number:2 }}%</strong></br>
-<strong>Optional Total: {{ctrl.optional_total}}, Pass: {{ ctrl.optional_pass }}, Rate: {{ ctrl.optional_pass / ctrl.optional_total * 100 | number:2 }}%</strong></br>
-
-<div ng-show="ctrl.cases">
- <hr >
-
- <div ng-show="ctrl.cases">
-
- <hr>
- <h4>Test Result Overview</h4>
-
- <uib-accordion close-others=false>
- <!-- The ng-repeat is used to pass in a local variable to the template. -->
- <ng-include
- src="ctrl.detailsTemplate"
- onload="isOpen = true">
- </ng-include>
- <br />
- </uib-accordion>
- </div>
+<strong>Total: {{ctrl.statistics.total}}, Pass: {{ ctrl.statistics.pass}}, Rate: {{ ctrl.statistics.pass / ctrl.statistics.total * 100 | number:2 }}%</strong></br>
+<strong>Mandatory Total: {{ctrl.statistics.mandatory.total}}, Pass: {{ ctrl.statistics.mandatory.pass }}, Rate: {{ ctrl.statistics.mandatory.pass / ctrl.statistics.mandatory.total * 100 | number:2 }}%</strong></br>
+<strong>Optional Total: {{ctrl.statistics.optional.total}}, Pass: {{ ctrl.statistics.optional.pass }}, Rate: {{ ctrl.statistics.optional.pass / ctrl.statistics.optional.total * 100 | number:2 }}%</strong></br>
+
+<div>
+ <hr>
+ <h4>Test Result Overview</h4>
+
+ <uib-accordion close-others=false>
+ <!-- The ng-repeat is used to pass in a local variable to the template. -->
+ <ng-include
+ src="ctrl.detailsTemplate"
+ onload="isOpen = true">
+ </ng-include>
+ <br />
+ </uib-accordion>
</div>
<!--
diff --git a/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js b/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js
index 2b61c981..0260938a 100644
--- a/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js
+++ b/cvp/3rd_party/static/testapi-ui/components/results-report/resultsReportController.js
@@ -20,7 +20,7 @@
.controller('ResultsReportController', ResultsReportController);
ResultsReportController.$inject = [
- '$http', '$stateParams', '$window',
+ '$scope', '$http', '$stateParams', '$window',
'$uibModal', 'testapiApiUrl', 'raiseAlert'
];
@@ -29,15 +29,24 @@
* This controller is for the '/results/<test run ID>' page where a user can
* view details for a specific test run.
*/
- function ResultsReportController($http, $stateParams, $window,
+ function ResultsReportController($scope, $http, $stateParams, $window,
$uibModal, testapiApiUrl, raiseAlert) {
var ctrl = this;
- ctrl.getResults = getResults;
+ ctrl.testStatus = 'total';
+ ctrl.case_list = [];
+ ctrl.data = {};
+ ctrl.statistics = {
+ 'total': 0, 'pass': 0, 'fail': 0,
+ 'mandatory': {'total': 0, 'pass': 0, 'fail': 0, 'area': 0},
+ 'optional': {'total': 0, 'pass': 0, 'fail': 0, 'area': 0}
+ };
+
ctrl.gotoDoc = gotoDoc;
ctrl.openAll = openAll;
ctrl.folderAll = folderAll;
+ ctrl.gotoResultLog = gotoResultLog;
/** The testID extracted from the URL route. */
ctrl.testId = $stateParams.testID;
@@ -47,16 +56,17 @@
ctrl.detailsTemplate = 'testapi-ui/components/results-report/partials/' +
'reportDetails.html';
- ctrl.total = 0;
- ctrl.mandatory_total = 0;
- ctrl.mandatory_pass = 0;
- ctrl.mandatory_fail = 0;
- ctrl.optional_total = 0;
- ctrl.optional_pass = 0;
- ctrl.optional_fail = 0;
+ $scope.load_finish = false;
- ctrl.testStatus = 'total';
- ctrl.gotoResultLog = gotoResultLog;
+ function extend(case_list) {
+ angular.forEach(case_list, function(ele){
+ ctrl.case_list.push(ele);
+ });
+ }
+
+ function strip(word) {
+ return word.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ }
function gotoResultLog(case_name) {
var case_area = case_name.split(".")[1];
@@ -68,129 +78,163 @@
} else {
log_url += case_area+"_logs/"+case_name+".log";
}
- window.open(log_url);
+ var is_reachable = false;
+
+ $.ajax({
+ url: log_url,
+ async: false,
+ success: function (response) {
+ is_reachable = true;
+ },
+ error: function (response){
+ alert("Log file could not be found. Please confirm this case has been executed successfully.");
+ }
+ });
+
+ if(is_reachable == true){
+ window.open(log_url);
+ }
}
+ $scope.$watch('load_finish', function(){
+ if($scope.load_finish == true){
+ var case_url = 'testapi-ui/components/results-report/data/testcases.json'
+ $http.get(case_url).then(function(response){
+ ctrl.data = response.data;
+
+ angular.forEach(ctrl.data.mandatory, function(value, name){
+ ctrl.data.mandatory[name].folder = true;
+ ctrl.data.mandatory[name].pass = 0;
+ ctrl.data.mandatory[name].fail = 0;
+ angular.forEach(value.cases, function(sub_case){
+ ctrl.statistics.total += 1;
+ ctrl.statistics.mandatory.total += 1;
+ if(ctrl.case_list.indexOf(sub_case) > -1){
+ ctrl.data.mandatory[name].pass += 1;
+ ctrl.statistics.mandatory.pass += 1;
+ ctrl.statistics.pass += 1;
+ }else{
+ ctrl.data.mandatory[name].fail += 1;
+ ctrl.statistics.mandatory.fail += 1;
+ ctrl.statistics.fail += 1;
+ }
+
+ });
+ });
- /**
- * Retrieve results from the TestAPI API server based on the test
- * run id in the URL. This function is the first function that will
- * be called from the controller. Upon successful retrieval of results,
- * the function that gets the version list will be called.
- */
- function getResults() {
- ctrl.cases = {};
- $http.get(testapiApiUrl + '/tests/' + ctrl.innerId).success(function(test_data){
- var results = test_data.results;
- angular.forEach(results, function(ele){
- var content_url = testapiApiUrl + '/results/' + ele;
- ctrl.resultsRequest =
- $http.get(content_url).success(function(data) {
- var result_case = data;
- if(result_case.project_name == 'yardstick'){
- yardstickHandler(result_case);
+ angular.forEach(ctrl.data.optional, function(value, name){
+ ctrl.data.optional[name].folder = true;
+ ctrl.data.optional[name].pass = 0;
+ ctrl.data.optional[name].fail = 0;
+ angular.forEach(value.cases, function(sub_case){
+ ctrl.statistics.total += 1;
+ ctrl.statistics.optional.total += 1;
+ if(ctrl.case_list.indexOf(sub_case) > -1){
+ ctrl.data.optional[name].pass += 1;
+ ctrl.statistics.optional.pass += 1;
+ ctrl.statistics.pass += 1;
}else{
- functestHandler(result_case);
+ ctrl.data.optional[name].fail += 1;
+ ctrl.statistics.optional.fail += 1;
+ ctrl.statistics.fail += 1;
}
- result_case.folder = true;
- ctrl.cases[result_case._id] = result_case;
- count(result_case);
- }).error(function (error) {
- ctrl.showError = true;
- ctrl.resultsData = null;
- ctrl.error = 'Error retrieving results from server: ' +
- angular.toJson(error);
+
});
});
+
+ ctrl.statistics.mandatory.area = Object.keys(ctrl.data.mandatory).length;
+ ctrl.statistics.optional.area = Object.keys(ctrl.data.optional).length;
+ }, function(error){
+ alert('error to get test case info');
+ });
+ }
+ });
+
+ function generate_format_data() {
+ var test_url = testapiApiUrl + '/tests/' + ctrl.innerId;
+ $http.get(test_url).then(function(test_resp){
+ angular.forEach(test_resp.data.results, function(result, index){
+ var result_url = testapiApiUrl + '/results/' + result;
+ $http.get(result_url).then(function(result_resp){
+ var sub_case_list = get_sub_case_list(result_resp.data);
+ extend(sub_case_list);
+ if(index == test_resp.data.results.length - 1){
+ $scope.load_finish = true;
+ }
+ }, function(result_error){
+ });
+ });
+
+ }, function(test_error){
+ alert('Error when get test record');
});
}
- function functestHandler(result_case){
- result_case.total = 0;
- result_case.pass = 0;
- result_case.fail = 0;
- if(result_case.details.success && result_case.details.success.length != 0){
- var sub_cases = result_case.details.success;
- if(result_case.case_name != 'refstack_defcore'){
- angular.forEach(sub_cases, function(ele, index){
- sub_cases[index] = ele.split(' ')[ele.split(' ').length - 1];
- });
- }
- result_case.details.success = sub_cases;
- result_case.total += sub_cases.length;
- result_case.pass += sub_cases.length;
- }
- if(result_case.details.errors && result_case.details.errors.length != 0){
- var sub_cases = result_case.details.errors;
- if(result_case.case_name != 'refstack_defcore'){
- angular.forEach(sub_cases, function(ele, index){
- sub_cases[index] = ele.split(' ')[ele.split(' ').length - 1];
- });
- }
- result_case.details.errors = sub_cases;
- result_case.total += sub_cases.length;
- result_case.fail += sub_cases.length;
- }
- if(result_case.total == 0){
- result_case.total = 1;
- if(result_case.criteria == 'PASS'){
- result_case.pass = 1;
- }else{
- result_case.fail = 1;
- }
+ function get_sub_case_list(result) {
+ if(result.project_name == 'yardstick'){
+ return yardstickPass(result);
+ }else{
+ return functestPass(result);
}
}
- function yardstickHandler(result_case){
- result_case.total = 0;
- result_case.pass = 0;
- result_case.fail = 0;
- angular.forEach(result_case.details.results, function(ele){
+ function yardstickPass(result) {
+ var case_list = [];
+ angular.forEach(result.details.results, function(ele){
if(ele.benchmark){
- result_case.total = 1;
if(ele.benchmark.data.sla_pass == 1){
- result_case.criteria = 'PASS';
- result_case.pass = 1;
- }else{
- result_case.criteria = 'FAILED';
- result_case.fail = 1;
+ case_list.push(result.case_name);
+ return case_list;
}
- return false;
}
});
+ return case_list;
}
- function count(result_case){
- var build_tag = result_case.build_tag;
- var tag = build_tag.split('-').pop().split('.')[1];
- ctrl.total += result_case.total;
- if(tag == 'ha' || tag == 'osinterop' || tag == 'vping'){
- ctrl.mandatory_total += result_case.total;
- ctrl.mandatory_pass += result_case.pass;
- ctrl.mandatory_fail += result_case.fail;
+ function functestPass(result){
+ var case_list = [];
+ if(result.case_name == 'refstack_defcore'){
+ angular.forEach(result.details.success, function(ele){
+ if(strip(ele) == 'tempest.api.identity.v3.test_t'){
+ case_list.push('tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token');
+ }else{
+ case_list.push(ele.split(' ')[ele.split(' ').length - 2]);
+ }
+ });
+ }else if(result.case_name == 'tempest_custom'){
+ angular.forEach(result.details.success, function(ele){
+ case_list.push(ele.split(' ')[ele.split(' ').length - 1]);
+ });
}else{
- ctrl.optional_total += result_case.total;
- ctrl.optional_pass += result_case.pass;
- ctrl.optional_fail += result_case.fail;
+ if(result.criteria == 'PASS'){
+ case_list.push(result.case_name);
+ }
}
+ return case_list;
}
function gotoDoc(sub_case){
}
function openAll(){
- angular.forEach(ctrl.cases, function(ele, id){
+ angular.forEach(ctrl.data.mandatory, function(ele, id){
+ ele.folder = false;
+ });
+ angular.forEach(ctrl.data.optional, function(ele, id){
ele.folder = false;
});
}
function folderAll(){
- angular.forEach(ctrl.cases, function(ele, id){
+ angular.forEach(ctrl.data.mandatory, function(ele, id){
+ ele.folder = true;
+ });
+ angular.forEach(ctrl.data.optional, function(ele, id){
ele.folder = true;
});
}
- getResults();
+ generate_format_data();
}
})();