当前位置:首页 > 报告详情

1173 - 高级自动化脚本技术.pdf

上传人: 竿*** 编号:982323 2025-11-29 18页 2.08MB

1、Advanced Automation Script TechniquesJason VenHuizenCPO-Naviam1173Automation Scripts are Customizations2 General conventions and techniques Defining custom objects in JavaScript and Python Passing functions as arguments Importing scripts and reusing libraries Implementing custom Java classes Demonst

2、ration:Implementing server sent events.3IntroductionGeneral Conventions and Techniques Use a main()function to enter the script.Provides a clear execution path Allows global runtime checks Allows code to return Avoids extensive if-then-else logic JavaScript Python5Use a main()Function Do not assume

3、the script was called from an expected event Ensure expected implicit variables are present mbo is not present in all contexts Use present variables to inform context,for example runAsUserInfo is only available for script CrontTasks Check that implicit variables are as expected Validate the mbo type

4、 Validate args are correct Attribute name available for attribute launch points,e.g.wonum6Validate Context and InputsValidate Context and Input Example7JavaScriptPython Configure format on save Ensures clean diffs Consistent formatting between developers Define and enforce corporate linters to avoid

5、 common mistakes Recommended VS Code formatters Prettier for JavaScript Black Formatter from Microsoft for Python8Format on Save File header change logs are for when you dont have source control and arent using VS Code Developer Tools This is pointless:9Stop Using File Header Change LogsDefining Obj

6、ects in JavaScript and PythonServer Sent Event Object11Java ScriptPythonPassing Functions as ArgumentsPass Function as Argument13Java ScriptPythonImporting Scripts and Reusing LibrariesInline a Library Script Source15Java ScriptPythonImplem

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据报告的内容,全文主要内容概括如下: - **自动化脚本技术**: - 使用`main()`函数作为脚本入口,提供清晰的执行路径和全局运行时检查。 - 验证上下文和输入,确保变量类型和参数正确。 - 格式化代码,使用Prettier和Black Formatter。 - 避免使用文件头部变更日志。 - **对象定义**: - 在JavaScript和Python中定义自定义对象。 - **函数传递**: - 将函数作为参数传递。 - **脚本导入与重用**: - 内联库脚本源,重用JavaScript和Python库。 - **自定义Java类**: - 实现自定义Java类。 - **演示**: - 创建服务器发送事件(SSE)对象。 - 创建自定义可运行对象。 - 使用函数生成事件,并在Postman中消费事件。
"主函数妙用,脚本执行无忧" "函数传递技巧,脚本更灵活" "脚本重用,效率翻倍!"
客服
商务合作
小程序
服务号
折叠