diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 91a9ded583..a91142ef94 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -18,12 +18,21 @@ :content="$t('commons.import')" @click="importJSON" /> - + placement="bottom" + trigger="hover" + :content="$t('envrionment.export_variable_tip')" + width="300"> + + + + + + + + + + + - + - + - + + + diff --git a/framework/sdk-parent/frontend/src/components/form/FormSection.vue b/framework/sdk-parent/frontend/src/components/form/FormSection.vue new file mode 100644 index 0000000000..98176bfd47 --- /dev/null +++ b/framework/sdk-parent/frontend/src/components/form/FormSection.vue @@ -0,0 +1,72 @@ + + + + {{ title }} + + + + + + + + + + + + + + diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index e27f7048f9..cd25d9bf7b 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -1578,6 +1578,7 @@ const message = { environment_group_id: "Environment Group ID", select_environment: "Please select environment", select_variable: "Please select variable", + select_api_variable: "Please select api variable", please_save_test: "Please Save Test First", common_config: "Common Config", http_config: "HTTP Config", @@ -2927,56 +2928,162 @@ const message = { step_results: "Step results", treatment_method: "Treatment method", scenario_steps: "Scenario steps", - basic_information: "Basic information", - check_element: "Please select the elements", - selenium_tip: "Support Selenium-IDE format", - selenium_export_tip: "Export side format", - elementObject: "Element Object", - elementLocator: "Element Locator", - elementType: "Element Type", - not_selected: "(Not Selected)", - not_selected_location: "(Not Selected Location)", - location: "Location", - run: "Run", - locate_type: "Locate Type", - coord: "Coord", - enable_or_not: "Enable/Disable", - enable: "Enable", - disable: "Disable", - resolution: "resolution", - ignore_fail: "ignore fail", - not_ignore_fail: "not ignore fail", - cmdValidation: "Assert", - cmdValidateValue: "Assert Value", - cmdValidateText: "Assert Text", - cmdValidateDropdown: "Assert Dropdown", - cmdValidateElement: "Assert Element", - cmdValidateTitle: "Assert Title", + cmdValidation: "Validation", + cmdValidateValue: "ValidateValue", + cmdValidateText: "ValidateText", + cmdValidateDropdown: "ValidateDropdown", + cmdValidateElement: "ValidateElement", + cmdValidateTitle: "ValidateTitle", cmdOpen: "Open", - cmdSelectWindow: "Select Window", - cmdSetWindowSize: "Set Window Size", - cmdSelectFrame: "Select Frame", - cmdDialog: "Dialog Operation", - cmdDropdownBox: "Dropdown Operation", - submit: "submit", - cmdSetItem: "Set Item", - cmdWaitElement: "Wait Element", + cmdSelectWindow: "SelectWindow", + cmdSetWindowSize: "SetWindowSize", + cmdSelectFrame: "SelectFrame", + cmdDialog: "DialogOperation", + cmdDropdownBox: "DropdownBox", + submit: "Submit", + cmdSetItem: "SetItem", + cmdWaitElement: "WaitElement", cmdInput: "Input", - cmdMouseClick: "Mouse Click", - cmdMouseMove: "Mouse Move", - cmdMouseDrag: "Mouse Drag", + cmdMouseClick: "MouseClick", + cmdMouseMove: "MouseMove", + cmdMouseDrag: "MouseDrag", cmdTimes: "Times", cmdForEach: "ForEach", cmdWhile: "While", cmdIf: "If", cmdElse: "Else", cmdElseIf: "ElseIf", - close: "close", + close: "Close", cmdExtraction: "Extraction", - cmdExtractWindow: "Extract window", - cmdExtractElement: "Extract Element", + cmdExtractWindow: "ExtractWindow", + cmdExtractElement: "ExtractElement", valiate_fail: "Validate fail", - check_subitem: 'check subitem', + basic_information: "Basic information", + step_type: "Step type", + selenium_tip: "Support Selenium-IDE plugin format import", + selenium_export_tip: "Export side file via MeterSphere", + elementObject: "Element Object", + elementLocator: "Element Locator", + elementType: "Category", + not_selected: "(No element selected)", + not_selected_location: "(No selected element location)", + location: "Location", + run: "Run", + locate_type: "Location method", + coord: "coordinate", + enable_or_not: "Enable/Disable", + enable: "Enable", + disable: "Disable", + resolution: "resolution", + ignore_fail: "Ignore exception and continue execution", + not_ignore_fail: "Abort process", + input_or_not: "input", + input_content: "Input content", + insert_content: "Type content", + append_content: "Append input", + append_tip: "Check, append the input after the existing content;Uncheck, clear the existing content and then input", + pls_input: "Please input content", + opt_type: "mode:", + yes: "Yes", + no: "No", + confirm: "OK", + cancel: "Cancel", + press_button: "Click the popup OK button or Cancel button", + param_null: "Parameter cannot be null", + operation_object: "Operation object", + sub_item: "Sub-item", + value: "value", + select: "Select", + option: "Option ( Option )", + index: "Index ( Index )", + s_value: "Value ( Value )", + text: "Text ( Text )", + set_itera: "Set traversal", + foreach_tip: "Set loop iteration, support array row data, for example: [1,2,3]; you can also enter variables", + intervals: "Interval time", + condition_type: "Condition Type", + please_select: "Please select", + condition_list: "Condition list: set multiple conditions by list", + condition_list_: "Condition List", + condition_exp: "Conditional expression: If the expression is true, then execute the steps inside", + condition_exp_: "Condition expression", + expression: "expression", + if_tip: "Please use ${var} for variables, and single quotes for strings, such as: ${name} === 'Zhangsan'", + input_c_tip: "'The contenteditable attribute of an editable paragraph element must be true to enable input; for example: <p contenteditable="true">This is an editable paragraph. Please try editing the text.< /p>'", + input: "input box", + editable_p: "Editable paragraph", + click_type: "Click method", + set_click_point: "Set the mouse click position", + click_tip_1: "Check to control the click position of the mouse on the element", + element_location: "Element Location", + click_point: "Click position", + x: "Abscissa", + y: "ordinate", + click_tip_2: "The upper left corner of the default element is 0, 0; by setting the relative position, control the click position of the mouse on the element", + click: "click", + dclick: "Double click", + press: "press", + standup: "Bounce up", + mouse_start: "Mouse start position", + drag_start: "The position of the starting point of the dragged element", + mouse_end: "Mouse end position", + drag_end: "The final position of the dragged element", + move_type: "Move Type", + mouse_location: "Mouse location", + relative_location: "relative coordinate location", + move_tip: "Relative position, the current position coordinate of the element is 0, 0", + mouse_out_e: "Mouse out of element", + mouse_in_e: "Mouse in element", + mouse_e_to_c: "Mouse mouse from element to coordinate position", + url: "Webpage address", + sf_tip: "If you are switching frames, you need to pass in the index or element positioning before switching", + sf_index: "frame index number", + select_index: "Select the frame of the current page;", + select_f_tip: "Example: For example, if the index value is entered as 1, the effect will switch to the second frame of the current page (the index value starts from 0)", + exit_frame: "Exit the current frame (back to the main page)", + select_frame_index: "Switch to the specified frame according to the frame index", + select_by_location: "Switch frame according to the positioning method", + sw_tip1: "If you switch to the specified window, you need to pass in the handle", + handle_id: "Handle ID", + window_handle: "Window handle ID", + frame_index: "Webpage index number", + window_index: "Window web page index number", + select_open_window: "Select the number of pages that have been opened;", + s_w_t1: "Example: For example, if the index value is entered as 3, then the effect will switch to the third window that has been opened (the index value starts from 1)", + switch_by_id: "Switch to the specified window according to the handle ID", + switch_by_index: "Switch to the specified window according to the page index number", + switch_to_default: "Switch to initial window", + ws_tip1: "Specify the size, set the size of the window according to the input width and height", + size: "Size:", + by_pixel: "in pixels", + width: "width", + height: "Height", + times: "Number of cycles", + set_times: "Set the number of times of the loop, you can enter a variable", + wait_text: "Wait for text", + wait_timeout: "Wait Timeout", + wait_for_text: "Wait for the element to be equal to the given value (Text)", + wait_for_ele_pre: "Wait for element to exist", + wait_for_ele_visible: "Wait for element to show", + wait_for_ele_not_visible: "Wait for element not visible", + wait_for_ele_not_pre: "Wait for element not present", + wait_for_ele_edi: "Wait for element to be editable", + wait_for_ele_not_edi: "Wait for element not editable", + wait_tip: "For the Text attribute of the element, it refers to the text content displayed on the page, and the waiting timeout time is 15000ms", + exe_first: "Execute first and then judge", + while_t_1: "Execute first and then judge similar to doWhile , execute the loop body once and then judge the condition", + while_t_2: "Please use ${var} for variables and single quotes for strings, such as: ${name} === 'Zhangsan'", + loop_time_out: "Loop timeout", + operation: "Operation", + use_pixel: 'use pixel', + fullscreen: 'maximum', + swicth_to_default: "switch to origin window", + program_controller: 'Process control', + input_operation: 'input operation', + mouse_operation: 'Mouse operation', + element_operation: 'Element operation', + dialog_operation: 'Pop-up operation', + browser_operation: 'Browser operation', pause: 'Pause', browser: "Browser", inner_drag: "Drag in element", @@ -2993,7 +3100,7 @@ const message = { custom_command_title: "Command", custom_command_label: "Custom command", automation_list: "Automation list", - create_custom_command: "Create command", + create_custom_command: "Add command", create_custom_command_label: "Create custom command", import_by_list_label: "UI list import", open_custom_command_label: "Open command", @@ -3004,14 +3111,161 @@ const message = { delete_scenario_lable: "Delete scenario", delete_command_lable: "Delete command", command_name_label: "Command name", - unplanned_module: "Unplanned module", + default_module: "Default module", + executing: "Executing...", + unexecute: "PENDING", + check_command: "Please tick the instruction", + ip: "ip address", + cword: "Word", + csentence: "Sentence", + cparagraph: "Paragraph", + loading: "Loading...", + close_dialog: "close", + unknown_scenario: "Unknown Scenario", + unknown_instruction: "Unknown Instruction", + unknown_element: "Unknown Element", + scenario_ref_add_warning: "No other steps can be added to the referenced scene/instruction steps and sub steps!", + batch_editing_steps: "Batch editing steps", + wait_time_config: "Timeout setting", + wait_element_timeout: "Wait element timeout", + more_config_options: "More advanced settings options", + updated_config_info: "The updated options are", + config_success: "Config success", + cmdFileUpload: "File upload", + relevant_file: "Relevant File", + validate_tips: "To judge whether the actual result is consistent with the expected one, you can add multiple assertions", + instruction: "instruction", + screen_tip: "If the scene step triggers a native popup (alert or prompt), or if there is no page, the screenshot will not take effect;", + ele_css_attr: "Element CSS attribute", + ele_css_tip1: "Such as element CSS properties, color properties, font-size properties, etc.", + store_css_attr: "CSS attribute (storeCssAttribute)", + validate_type: "Please select an assertion method", + expect_value: "Expected value", + expect_title: "Please enter the desired page title", + title_tip: "Assert whether the title of the current window is consistent with the expected value, if it matches exactly, the assertion succeeds, otherwise it fails", + input_var: "Please enter a variable", + input_expect: "Please enter the expected value", + var_tip: "Assert whether the variable matches the expected value", + confirm_after_success: "Whether to click the confirm button after success", + input_expect_text: "Please enter the expected popup text", + input_window_tip: "Only supports the assertion of pop-up text. If yes, the confirmation button on the pop-up will be clicked after the assertion is successful. If no, no button will be clicked after the assertion is successful", + select_value: "The value of the selected element is equal to the desired (SelectedValue)", + select_label: "The text displayed by the drop-down box option is equal to the expected (SelectedLabel) ", + not_select_value: "The value of the selected element is not equal to the expected (NotSelectedValue)", + assert_check: "The element is checked (Checked)", + assert_editable: "Element is editable (Editable)", + assert_element_present: "Element Present (ElementPresent)", + assert_element_not_present: "ElementNotPresent", + assert_element_not_checked: "Element is not checked (NotChecked)", + assert_element_not_editable: "Element is not editable (NotEditable)", + assert_element_not_text: "Element text is not equal to expected (NotText)", + assert_text: "Element text equals expected(Text)", + assert_value: "The element value is equal to the expected (Value)", + script_tip: "Only js script is supported, the set script will be executed in the browser", + script_type: "Script Type", + set_var: "Set variable", + async: "async", + sync: "Sync", + return: "There is a return value", + no_return: "No return value", + sample_obj: "Ordinary Object", + is_string: "Is it a string type", + like_string_tip: "Such as strings, numbers, json objects, arrays, etc.;", + like_string_tip2: "Note: If it is not a valid js object type when stored as an object type (such as illegal special characters, space effects), it may generate a report failure.", + ele_pro: "Element Properties", + like_ele_tip: "such as the element's name attribute, id attribute, value attribute, etc.", + xpath_locator: "xpath path", + xpath_tip: "Only supports element positioning in xpath mode, and returns a value", + store: "Ordinary object (store)", + store_text: "Element text (storeText)", + store_value: "Element value (storeValue)", + store_attr: "Element attribute (storeAttribute)", + store_xpath_count: "Number of elements matching xpath (storeXpathCount)", + store_window_handle: "Window Handle(storeWindowHandle)", + store_title: "Web page title (storeTitle)", + wait_time: "Wait time", + per_tip: "After enabling the performance mode, the memory and cpu usage will be reduced, and the running results will not show step screenshots", + fail_over: "Failed to terminate", + validate_tip: "Check means a hard assertion (assert), if the assertion fails, the program will terminate. Unchecked means a soft assertion (verify), if the assertion fails, the program will not terminate.", + scenario: "Scenario", + extract_type: "Please select the extraction information type", + input_handle_name: "Please enter the storage window handle variable name", + extract_tip: "Save the extracted content to a variable", + input_window_title: "Please enter the variable name to store the title of the webpage", + revoke: "Revoke", + is_required: "Required", + remark: "Remark", + result: "Result", + var_step: "Variable generation steps", + param_required_tip: "After debugging and saving, the usage of variables will be automatically verified. The parameters used in user-defined steps must be filled in; Not required is the redundant parameter not used in the custom step.", + name: "Name", + parameter_configuration: "Parameter configuration", + enter_parameters: "Enter parameters", + out_parameters: "Outer parameters", + opt_ele: "Operation element", + dst_ele: "Destination element", + drag_type: "Drag and drop method", + drag_end_point: "The final position of the dragged element", + add_file: "Add file", + file: "File: 【", + been_deleted: "】 has been deleted! Please select the file again!", + click_force: "Force click", + click_tip_3: "Checked, the element is blocked and can be forced to click", + pls_sel_loctype: "Please select a location type", + pls_input_locator: "Please fill in the location", + import_template: "Import Template", + download_template: "Download Template", + import_desc: "Import Description", + el_import_tip_1: "1. If the imported ID already exists, update the element;", + el_import_tip_2: "2. If the imported ID is empty or the ID does not exist, add an element;", + el_import: "Element import", + empty_text: "No data yet", + confirm_del_el: "Confirm delete element", + confirm_del: "Confirm delete", + confirm_del_in : "Confirm delete command", + deng: "wait", + ge_instruction: "Instructions?", + ge_el: "elements?", + ge_scenario: "Scenarios?", + view_ref: "View Reference", + unplanned_element: "Unplanned element", + scenario_instruction: "Scenario/Instruction", + element_beening: "The element under the module is being", + element_beening_desc: "element used be scenario", + reference: "reference", + continue_or_not: "Whether to continue", + continue_or_not_delete: "Whether to continue delete", + unplanned_scenario: "Unplanned Scenario", + unplanned_module: "Unplanned Module", + confrim_del_node: "OK to delete node", + and_all_sub_node: "All resources under its subnodes?", + instruction_is_referenced: "Instruction is referenced:", + scenario_is_referenced: "Scenario is referenced:", + confirm_del_ins: "Confirm Delete Instruction", + confirm_del_scen: "Confirm delete scene", check_grid: "Connection failed, please check selenium-grid service status", check_grid_ip: "Connection failed, please check selenium-grid address information", view_config: "View configuration information", config_ip: "The local ip and port information are not detected, please check", personal_info: "Personal Information", in_config: "In Settings", - }, + command_steps_label: "Instruction Steps", + assert_in_text: "Element text contains expectations (InText)", + assert_not_in_text: "Element text does not contain expectations (NotInText)", + equal: "equal", + not_equal: "not equal to", + contain: "contains", + not_contain: "Does not contain", + greater: "greater than", + greater_equal: "greater than or equal to", + lower: "less than", + lower_equal: "Less than or equal to", + null: "empty", + not_null: "not null", + assertion_configuration: "Assertion Configuration", + smart_variable_enable: "Use the current scene variables first", + use_origin_variable_scene: "Use original scene variables", + use_origin_env_run: "Use original scene environment to execute"}, project_application: { workstation: { time_tip: 'Off, no time range is set; On, according to the set time range, enter the list to be updated, if the time range is exceeded, it will be automatically cleared from the list;', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 239fe9244b..c4fbea9654 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -490,7 +490,8 @@ const message = { ui_scenario: '未规划场景', ui_module: "未规划模块", }, - template_delete: "模版删除" + template_delete: "模版删除", + scope: "应用场景", }, login: { normal_Login: "普通登录", @@ -1587,6 +1588,7 @@ const message = { environment_group_id: "环境组ID", select_environment: "请选择环境", select_variable: "请选择变量", + select_api_variable: "请选择接口测试变量", please_save_test: "请先保存测试", common_config: "通用配置", list_info: "列表数据用,分隔", @@ -2963,7 +2965,7 @@ const message = { cmdElse: "Else", cmdElseIf: "ElseIf", close: "关闭网页", - cmdExtraction: "提取参数", + cmdExtraction: "数据提取", cmdExtractWindow: "提取窗口信息", cmdExtractElement: "提取元素信息", valiate_fail: "校验失败,请检查必填项", @@ -2986,6 +2988,113 @@ const message = { treatment_method: "处理方式", scenario_steps: "场景步骤", basic_information: "基础信息", + step_type: "步骤类型", + input_or_not: "是否输入", + input_content: "输入内容", + insert_content: "键入内容", + append_content: "追加输入", + append_tip: "勾选,在现有内容后面追加输入;不勾选,清空现有内容后再进行输入", + pls_input: "请输入内容", + opt_type: "操作方式:", + yes: "是", + no: "否", + confirm: "确定", + cancel: "取消", + press_button: "点击弹窗确定按钮或取消按钮", + param_null: "参数不能为空", + operation_object: "操作对象", + sub_item: "子选项", + value: "值", + select: "选择", + option: "选项( Option )", + index: "索引( Index )", + s_value: "值( Value )", + text: "文本( Text )", + set_itera: "设置遍历", + foreach_tip: "设置循环迭代,支持数组行数据,例如: [1,2,3];也可输入变量", + intervals: "间隔时间", + condition_type: "条件类型", + please_select: "请选择", + condition_list: "条件列表:通过列表的方式设置多个条件", + condition_list_: "条件列表", + condition_exp: "条件表达式:表达式判断为真,则执行里面的步骤", + condition_exp_: "条件表达式", + expression: "表达式", + if_tip: "变量请使用${var},字符串请加单引号,如:${name} === '张三'", + input_c_tip: "'可编辑段落的元素 contenteditable 属性必须为 true, 才可实现输入;例:<p contenteditable="true">这是一段可编辑的段落。请试着编辑该文本。</p>'", + input: "输入框", + editable_p: "可编辑段落", + click_type: "点击方式", + set_click_point: "设置鼠标点击位置", + click_tip_1: "勾选,可控制鼠标在元素上的点击位置", + element_location: "元素位置", + click_point: "点击位置", + x: "横坐标", + y: "纵坐标", + click_tip_2: "默认元素的左上角为0,0;通过设置相对位置,控制鼠标在元素上的点击位置", + click: "单击", + dclick: "双击", + press: "按下", + standup: "弹起", + mouse_start: "鼠标起始位置", + drag_start: "被拖拽的元素起点的位置", + mouse_end: "鼠标终点位置", + drag_end: "被拖拽的元素最终的位置", + move_type: "移动方式", + mouse_location: "鼠标位置", + relative_location: "相对坐标位置", + move_tip: "相对位置,元素当前的位置坐标为0,0", + mouse_out_e: "鼠标移出元素", + mouse_in_e: "鼠标移入元素", + mouse_e_to_c: "鼠标从元素移到坐标位置", + url: "网页地址", + sf_tip: "如果是切换 frame,需要传入索引或者元素定位后再切换", + sf_index: "frame 索引号", + select_index: "选择当前页面的第几个 frame;", + select_f_tip: "例:比如索引值输入 1,那么效果会切换到当前页面的第 2 个 frame(索引值从 0 开始计算)", + exit_frame: "退出当前 frame(回到主页面)", + select_frame_index: "根据 frame 索引号切换到指定 frame", + select_by_location: "根据定位方式切换 frame", + sw_tip1: "如果是切换到指定窗口,需要传入句柄", + handle_id: "句柄 ID", + window_handle: "窗口句柄 ID", + frame_index: "网页索引号", + window_index: "窗口网页索引号", + select_open_window: "选择打开过的第几个网页;", + s_w_t1: "例:比如索引值输入 3,那么效果会切换到已经打开过的第 3 个窗口(索引值从 1 开始计算)", + switch_by_id: "根据句柄 ID 切换到指定窗口", + switch_by_index: "根据网页索引号切换到指定窗口", + swicth_to_default: "切换到初始窗口", + ws_tip1: "指定尺寸,根据输入的宽度和高度,设置窗口的大小", + size: "尺寸:", + by_pixel: "以像素为单位", + width: "宽度", + height: "高度", + times: "循环次数", + set_times: "设置循环的次数,可输入变量", + wait_text: "等待文本", + wait_timeout: "等待超时", + wait_for_text: "等待元素等于给定的定值(Text)", + wait_for_ele_pre: "等待元素存在", + wait_for_ele_visible: "等待元素显示", + wait_for_ele_not_visible: "等待元素不显示", + wait_for_ele_not_pre: "等待元素不存在", + wait_for_ele_edi: "等待元素可编辑", + wait_for_ele_not_edi: "等待元素不可编辑", + wait_tip: "针对元素的Text属性,指页面展示出来的文本内容,等待超时时间为15000ms", + exe_first: "先执行后判断", + while_t_1: "先执行后判断类似 doWhile ,先执行一次循环体再判断条件", + while_t_2: "变量请使用${var},字符串请加单引号,如:${name} === '张三'", + loop_time_out: "循环超时时间", + operation: '操作', + use_pixel: '指定尺寸(像素为单位)', + fullscreen: '窗口最大化', + program_controller: '流程控制', + input_operation: '输入操作', + mouse_operation: '鼠标操作', + element_operation: '元素操作', + dialog_operation: '弹窗操作', + browser_operation: '浏览器操作', check_element: "请勾选元素", check_subitem: '请选择子分类', pause: '等待时间', @@ -3017,13 +3126,157 @@ const message = { command_name_label: "指令名称", command_steps_label: "指令步骤", command_step_info: "在右侧添加指令步骤", + default_module: "默认模块", + executing: "正在执行...", + unexecute: "未执行", + check_command: "请勾选指令", + ip: "ip地址", + cword: "词语", + csentence: "句子", + cparagraph: "段落", + loading: "加载中...", + close_dialog: "关闭", + unknown_scenario: "创建场景", + unknown_instruction: "创建指令", + unknown_element: "创建元素", + scenario_ref_add_warning: "引用的场景/指令步骤及子步骤都无法添加其他步骤!", + batch_editing_steps: "批量编辑步骤", + wait_time_config: "超时时间设置", + wait_element_timeout: "等待元素超时时间", + more_config_options: "更多高级设置选项", + updated_config_info: "更新后选项为", + config_success: "配置成功", + cmdFileUpload: "文件上传", + relevant_file: "关联需要上传的文件", + validate_tips: "判断实际的结果是否与期望的一致,可添加多条断言", + instruction: "指令", + screen_tip: "场景步骤如果触发原生弹窗(alert或prompt),或不存在页面时,截图不生效;", + ele_css_attr: "元素CSS属性", + ele_css_tip1: "如元素的 CSS 属性,color 属性,font-size 属性等", + store_css_attr: "CSS属性(storeCssAttribute)", + validate_type: "请选择断言方式", + expect_value: "期望值", + expect_title: "请输入期望的网页标题", + title_tip: "断言当前窗口的标题是否跟期望值一致,完全匹配则断言成功,否则失败", + input_var: "请输入变量", + input_expect: "请输入期望值", + var_tip: "断言变量与期望值是否匹配", + confirm_after_success: "成功后是否点击确认按钮", + input_expect_text: "请输入期望的弹窗文本", + input_window_tip: "仅支持弹窗文本的断言,选择是,则断言成功后会点击弹窗上的确认按钮,选择否,则断言成功后不点击任何按钮", + select_value: "所选元素的值等于期望(SelectedValue)", + select_label: "下拉框选项显示的文本等于期望(SelectedLabel) ", + not_select_value: "所选元素的值不等于期望(NotSelectedValue) ", + assert_check: "元素被选中(Checked)", + assert_editable: "元素可编辑(Editable)", + assert_element_present: "元素存在(ElementPresent)", + assert_element_not_present: "元素不存在(ElementNotPresent)", + assert_element_not_checked: "元素未被选中(NotChecked)", + assert_element_not_editable: "元素不可编辑(NotEditable)", + assert_element_not_text: "元素文本不等于期望(NotText)", + assert_text: "元素文本等于期望(Text)", + assert_value: "元素值等于期望(Value)", + script_tip: "仅支持js脚本,设置的脚本将在浏览器执行", + script_type: "脚本类型", + set_var: "设置变量", + async: "异步", + sync: "同步", + return: "有返回值", + no_return: "无返回值", + sample_obj: "普通对象", + is_string: "是否为字符串类型", + like_string_tip: "如字符串、数字、json对象、数组等;", + like_string_tip2: "注意:作为对象类型存储时如果不是一个合法的 js 对象类型(如非法特殊字符、空格影响),可能会生成报告失败。", + ele_pro: "元素属性", + like_ele_tip: "如元素的 name 属性,id 属性,value 属性等", + xpath_locator: "xpath 路径", + xpath_tip: "只支持 xpath 方式的元素定位,返回的是一个数值", + store: "普通对象(store)", + store_text: "元素文本(storeText)", + store_value: "元素值(storeValue)", + store_attr: "元素属性(storeAttribute)", + store_xpath_count: "匹配 xpath 的元素数量(storeXpathCount)", + store_window_handle: "窗口 Handle(storeWindowHandle)", + store_title: "网页标题(storeTitle)", + wait_time: "等待时间", + per_tip: "启用性能模式后,将减少内存和cpu的占用,运行结果不展示步骤截图", + fail_over: "失败终止", + validate_tip: "勾选表示为硬断言(assert),如果断言失败,程序会终止。不勾选表示为软断言(verify),如果断言失败,程序不会终止。", + scenario: "场景", + extract_type: "请选择提取信息类型", + input_handle_name: "请输入存储窗口 Handle 变量名", + extract_tip: "将提取的内容保存到变量中", + input_window_title: "请输入存储网页标题变量名", + opt_ele: "操作元素", + dst_ele: "目标元素", + drag_type: "拖拽方式", + drag_end_point: "被拖拽的元素最终的位置", + revoke: "撤回", + is_required: "是否必填", + remark: "备注", + result: "执行结果", + var_step: "变量产生步骤", + param_required_tip: "调试保存后,自动校验变量使用情况, 必填为自定义步骤内使用到的参数;非必填为自定义步骤内未使用到的冗余参数", + name: "名称", + parameter_configuration: "参数配置", + enter_parameters: "入参", + out_parameters: "出参", + add_file: "添加文件", + file: "文件: 【", + been_deleted: "】 已被删除!请重新选择文件!", + click_force: "强制点击", + click_tip_3: "勾选,元素被遮挡,可强制点击", + pls_sel_loctype: "请选择定位类型", + pls_input_locator: "请填写定位", + import_template: "导入模板", + download_template: "下载模板", + import_desc: "导入说明", + el_import_tip_1: "1.如果导入的ID已存在,则更新元素;", + el_import_tip_2: "2.如果导入的ID为空或ID不存在,则新增元素;", + el_import: "元素导入", + empty_text: "暂无数据", + confirm_del_el: "确认删除元素 ", + confirm_del: "确认删除 ", + confirm_del_in : "确认删除指令 ", + deng: "等 ", + ge_instruction: "个指令 ?", + ge_el: "个元素 ?", + ge_scenario: " 个场景 ?", + view_ref: "查看引用", + unplanned_element: "未规划元素", + scenario_instruction: "场景/指令", + element_beening: "模块下的元素被", + element_beening_desc: "元素被场景", + reference: "引用", + continue_or_not: "是否继续", + continue_or_not_delete: "是否继续删除", unplanned_scenario: "未规划场景", + unplanned_module: "未规划模块", + confrim_del_node: "确定删除节点 ", + and_all_sub_node: " 及其子节点下所有资源?", + instruction_is_referenced: "指令被引用:", + scenario_is_referenced: "场景被引用:", + confirm_del_ins: "确认删除指令", + confirm_del_scen: "确认删除场景", check_grid: "连接失败,请检查 selenium-grid 服务状态", check_grid_ip: "连接失败,请检查 selenium-grid 地址信息", view_config: "查看配置信息", config_ip: "没有检测到本地ip和端口信息,请在", personal_info: "个人信息", in_config: "中设置", + assert_in_text: "元素文本包含期望(InText)", + assert_not_in_text: "元素文本不包含期望(NotInText)", + equal: "等于", + not_equal: "不等于", + contain: "包含", + not_contain: "不包含", + greater: "大于", + greater_equal: "大于等于", + lower: "小于", + lower_equal: "小于等于", + null: "空", + not_null: "非空", + assertion_configuration: "断言配置", }, project_application: { workstation: { @@ -3046,6 +3299,9 @@ const message = { scenario_title: "场景测试任务", ui_title: "UI测试任务", perf_title: "性能测试任务" + }, + envrionment: { + export_variable_tip: "导出接口测试变量" } } diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index dce40c4c4c..bbfa93c43a 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -1584,6 +1584,7 @@ const message = { environment_group_id: "環境組ID", select_environment: "請選擇環境", select_variable: "請選擇变量", + select_api_variable: "請選擇接口測試变量", please_save_test: "請先保存測試", common_config: "通用配置", http_config: "HTTP配置", diff --git a/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java b/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java new file mode 100644 index 0000000000..3a93a3c33e --- /dev/null +++ b/project-management/backend/src/main/java/io/metersphere/controller/remote/UiTestController.java @@ -0,0 +1,29 @@ +package io.metersphere.controller.remote; + +import io.metersphere.service.remote.UiTestService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +@RestController +@RequestMapping(path = { + "/test/plan/uiScenario/case", + "/ui/scenario/module", + "/share/test/plan/uiScenario/case", + "/ui/automation" +}) +public class UiTestController { + @Resource + UiTestService uiTestService; + + @PostMapping("/**") + public Object list(HttpServletRequest request, @RequestBody Object param) { + return uiTestService.post(request.getRequestURI(), param); + } + + @GetMapping("/**") + public Object get(HttpServletRequest request) { + return uiTestService.get(request.getRequestURI()); + } +} diff --git a/project-management/backend/src/main/java/io/metersphere/service/remote/UiTestService.java b/project-management/backend/src/main/java/io/metersphere/service/remote/UiTestService.java new file mode 100644 index 0000000000..0228e96538 --- /dev/null +++ b/project-management/backend/src/main/java/io/metersphere/service/remote/UiTestService.java @@ -0,0 +1,13 @@ +package io.metersphere.service.remote; + +import io.metersphere.commons.constants.MicroServiceName; +import io.metersphere.service.RemoteService; +import org.springframework.stereotype.Service; + +@Service +public class UiTestService extends RemoteService { + + public UiTestService() { + super(MicroServiceName.UI_TEST); + } +} diff --git a/project-management/frontend/src/business/menu/environment/EnvironmentList.vue b/project-management/frontend/src/business/menu/environment/EnvironmentList.vue index 91eba967d2..585ad24296 100644 --- a/project-management/frontend/src/business/menu/environment/EnvironmentList.vue +++ b/project-management/frontend/src/business/menu/environment/EnvironmentList.vue @@ -137,7 +137,7 @@ import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOp import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination"; import ApiEnvironmentConfig from "metersphere-frontend/src/components/environment/ApiEnvironmentConfig"; import {Environment, parseEnvironment} from "metersphere-frontend/src/model/EnvironmentModel"; -import EnvironmentEdit from "metersphere-frontend/src/components/environment/EnvironmentEdit"; +import EnvironmentEdit from "./components/EnvironmentEdit"; import MsAsideItem from "metersphere-frontend/src/components/MsAsideItem"; import MsAsideContainer from "metersphere-frontend/src/components/MsAsideContainer"; import ProjectSwitch from "metersphere-frontend/src/components/head/ProjectSwitch"; diff --git a/project-management/frontend/src/business/menu/environment/components/EnvironmentEdit.vue b/project-management/frontend/src/business/menu/environment/components/EnvironmentEdit.vue new file mode 100644 index 0000000000..59a82d41a7 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/EnvironmentEdit.vue @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('commons.confirm') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('operating_log.change_history') }} + + + + + + + + + {{ $t('operating_log.change_history') }} + + + + + + + + {{ $t('api_test.definition.request.all_auth_config') }} + + + + + + + {{ $t('env_options.all_assertions') }} + + + + + + + + + + + + {{ $t('error_report_library.conflict_with_success') }} + + + + + + + {{ $t('error_report_library.conflict_with_error') }} + + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue new file mode 100644 index 0000000000..3d9df1e9bc --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue @@ -0,0 +1,583 @@ + + + + + + + + {{ $t('api_test.environment.socket') }} + + + + + + + + + + + {{ $t('commons.description') }} + + + + + + {{ $t('api_test.environment.condition_enable') }} + + {{ $t('api_test.definition.document.data_set.none') }} + {{ $t('test_track.module.module') }} + {{ $t('api_test.definition.api_path') }} + + + + + + + + + + + + + + + + + + {{ $t('api_test.request.headers') }} + + {{ + $t("commons.batch_add") + }} + + + + + + {{ $t('commons.add') }} + + + + {{ $t('commons.clear') }} + + {{ + $t('commons.update') + }} + + + + + + + + + + + {{$t("ui.browser")}} + + + + + + + + + {{ $t("ui.performance_mode") }} + + + + + + + + + + + + + + + + + + + {{ getUrl(row) }} + + + + + {{ getName(row) }} + + + + + {{ getDetails(row) }} + + + + + {{ row.time | datetimeFormat }} + + + + + {{ row.description }} + + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/PlanStatusTableItem.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/PlanStatusTableItem.vue new file mode 100644 index 0000000000..2628d4548e --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/PlanStatusTableItem.vue @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/ToggleTabs.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/ToggleTabs.vue new file mode 100644 index 0000000000..5b3efa4d21 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/ToggleTabs.vue @@ -0,0 +1,71 @@ + + + + {{ item.content }} + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandList.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandList.vue new file mode 100644 index 0000000000..cda1639483 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandList.vue @@ -0,0 +1,1201 @@ + + + + + + + + + + + + {{ scope.row.deleteTime | timestampFormatDate }} + + + + + + + + + + + {{ scope.row.num }} + + + + + + + + + + {{ scope.row.customNum }} + + + + + + + + + + + + + {{ scope.row.updateTime | timestampFormatDate }} + + + + + {{ scope.row.createTime | timestampFormatDate }} + + + + + + + + {{ $t('Success') }} + + + {{ $t('Error') }} + + + {{ $t('Pending') }} + + + {{ row.lastResult }} + + + {{ $t('Pending') }} + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandModule.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandModule.vue new file mode 100644 index 0000000000..f3bf3a4b53 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiCustomCommandModule.vue @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioCookieTable.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioCookieTable.vue new file mode 100644 index 0000000000..d260bab626 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioCookieTable.vue @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ + scope.row.updateTime | datetimeFormat + }} + + + + + + + + + + + + + + 查看关联 + 取消关联 + 重新关联 + + + + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioEditRelevance.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioEditRelevance.vue new file mode 100644 index 0000000000..2961b1750f --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioEditRelevance.vue @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + + + + + + {{ $t("api_test.scenario.reference") }} + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioList.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioList.vue new file mode 100644 index 0000000000..64b88e3c46 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioList.vue @@ -0,0 +1,1367 @@ + + + + + + + + + + + + {{ scope.row.deleteTime | datetimeFormat }} + + + + + + + + + + + {{ scope.row.num }} + + + + + + + + {{ scope.row.customNum }} + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row.updateTime | datetimeFormat }} + + + + + {{ scope.row.createTime | datetimeFormat }} + + + + + + + + {{ $t('Success') }} + + + {{ $t('Error') }} + + + {{ $t('Pending') }} + + + {{ row.lastResult }} + + + {{ $t('Pending') }} + + + + + + + + + + + + + STOP + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioModule.vue b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioModule.vue new file mode 100644 index 0000000000..ca99119d87 --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/UiScenarioModule.vue @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + diff --git a/project-management/frontend/src/business/menu/environment/components/ui-related/ui-scenario.js b/project-management/frontend/src/business/menu/environment/components/ui-related/ui-scenario.js new file mode 100644 index 0000000000..773afe36eb --- /dev/null +++ b/project-management/frontend/src/business/menu/environment/components/ui-related/ui-scenario.js @@ -0,0 +1,38 @@ +import {get, post} from "metersphere-frontend/src/plugins/request" + +let baseUrl = '/ui/scenario/module/'; +let trashUrl = '/ui/scenario/module/trash/'; + +export function getScenarioModules(projectId, isTrashData, type) { + let url = isTrashData ? trashUrl : baseUrl; + url = url + 'list/' + projectId + if(type){ + url = `${url}?type=${type}`; + } + return get(url); +} + +export function addScenarioModule(param) { + return post(baseUrl + 'add', param); +} + +export function editScenarioModule(param) { + return post(baseUrl + 'edit', param); +} + +export function dragScenarioModule(param) { + return post(baseUrl + 'drag', param); +} + +export function posScenarioModule(param, callback) { + return post(baseUrl + 'pos', param, callback); +} + +export function deleteScenarioModule(nodeIds, callback) { + return post(baseUrl + 'delete', nodeIds, callback); +} + +export function getUiAutomationList(currentPage, pageSize, param) { + return post("/ui/automation/list/" + currentPage + "/" + pageSize, param); +} + diff --git a/project-management/frontend/src/i18n/lang/zh-CN.js b/project-management/frontend/src/i18n/lang/zh-CN.js index c082d710f1..b37a22283c 100644 --- a/project-management/frontend/src/i18n/lang/zh-CN.js +++ b/project-management/frontend/src/i18n/lang/zh-CN.js @@ -35,6 +35,9 @@ const message = { }, project_version: { version_time: '版本周期', + }, + environment: { + export_variable_tip : "导出接口测试变量" } }
{{ $t('api_test.request.headers') }}