test-wso2-integrator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWSO2 Integrator
WSO2 Integrator
WSO2 Integrator is a visual integration development tool. It lets you build integration services (HTTP APIs, proxies, etc.) through a graphical flow editor rather than writing code by hand.
WSO2 Integrator是一款可视化集成开发工具。它允许你通过图形化流程编辑器构建集成服务(HTTP API、代理等),而非手动编写代码。
Key Characteristics of WSO2 Integrator
WSO2 Integrator的核心特性
- VS Code-based — Runs inside VS Code as an extension with a webview UI (guest frame) alongside VS Code's native chrome (host frame)
- Visual flow editor — You design service logic by adding nodes (Return, If, etc.) to an SVG-based flow diagram, connecting them visually
- Code generation — Behind the scenes it generates Ballerina (.bal) source code from the visual flow
- Connectors — Supports HTTP connections and others via a connector palette
- Integrated run/debug — Has "Run Integration" that compiles and runs the Ballerina project, starting an HTTP listener (default on localhost:9090)
- Ships with a monitoring tool, WSO2 ICP.
- 基于VS Code——作为扩展在VS Code内运行,带有webview UI(访客框架),与VS Code的原生界面(宿主框架)协同工作
- 可视化流程编辑器——通过向基于SVG的流程图添加节点(返回、条件判断等),以可视化方式连接它们来设计服务逻辑
- 代码生成——在后台从可视化流程生成Ballerina(.bal)源代码
- 连接器——通过连接器面板支持HTTP连接及其他类型的连接
- 集成运行/调试——具备“运行集成”功能,可编译并运行Ballerina项目,启动HTTP监听器(默认在localhost:9090)
- 附带监控工具WSO2 ICP
Testing
测试
Use Playwright based cli tool to drive Integrator programmatically. Install with user consent (npm install -g wso2ipw).
wso2ipwBreak the task into chunks, for each chunk create a sh, run and test, repeat until success, move to next chunk. See examples dir.
It's always possible to modify the Ballerina code directly to get the output. Yet, the whole point of this effort the Integrator UI. Try to mimic a real user’s UI actions as much as possible. NEVER edit bal file directly. It's OK to use CLI (curl) background tasks such as verify the produced service is up.
You may sometimes need some mocks to write the integrations, prompt users for a couple of options and implement those (e.g. create a hello service in node). The user is not interested in technical minutiae of the mocks, only about issues in ICP, pre pick answers and only get confirmation.
Don't try to open project, the cli can't control the native open dialog box.
Try to avoid timed wait and sleep, instead use wait-for-text. Try to avoid conditional flows (except in final testing)
使用基于Playwright的CLI工具以编程方式驱动Integrator。需经用户同意后安装(npm install -g wso2ipw)。
wso2ipw将任务拆分为多个模块,为每个模块创建shell脚本,运行并测试,重复操作直至成功,再进入下一个模块。详见examples目录。
你始终可以直接修改Ballerina代码来获取输出,但本次工作的核心是测试Integrator UI。请尽可能模拟真实用户的UI操作。绝对不要直接编辑.bal文件。可以使用CLI(curl)后台任务来验证生成的服务是否正常运行。
有时你可能需要一些模拟服务来编写集成,可向用户提供几个选项并实现(例如在node中创建hello服务)。用户对模拟服务的技术细节不感兴趣,只关心ICP中的问题,可预先选择答案并仅获取确认。
不要尝试打开项目,因为CLI无法控制原生打开对话框。
尽量避免定时等待和休眠,改用wait-for-text。尽量避免条件流程(最终测试阶段除外)
Commands
命令
- app: open [--user-data-dir=path], close
- inspect: snapshot, screenshot [file], eval <g:|h:><js>
- interact: click/dblclick <g:|h:><ref> [--force], fill <g:|h:><ref> <text> (fill will auto detect input type (plain, cm) and act. Use fill over type for input boxes)
- keys: type <text>, press <key>
- util: wait [ms], wait-for-text <text> [--timeout=N] [--hidden]
- flags: --force (bypass overlay/pointer-event checks, default for g:)
- app: open [--user-data-dir=路径], close
- inspect: snapshot, screenshot [文件], eval <g:|h:><js>
- interact: click/dblclick <g:|h:><ref> [--force], fill <g:|h:><ref> <文本>(fill会自动检测输入类型(普通、cm)并执行操作。输入框优先使用fill而非type)
- keys: type <文本>, press <按键>
- util: wait [毫秒], wait-for-text <文本> [--timeout=N] [--hidden]
- flags: --force(绕过覆盖层/指针事件检查,g:默认启用)
Report
报告
At the end, MUST report bugs, limitations, and UX issues in WSO2 Integrator (not in wso2ipw). Try to focus on bugs that would be detrimental to a real user not an automation/screen reader.
最后,必须报告WSO2 Integrator(而非wso2ipw)中的bug、限制和UX问题。请重点关注对真实用户(而非自动化/屏幕阅读器用户)有害的bug。