无人值守处理 - 应用自动化

发布于 2024-07-13 05:42:20 字数 324 浏览 3 评论 0原文

我正在寻找自动化应用程序的信息[我犹豫是否推断“最佳实践”]。 我特别指的是用由用户安排并“自动”执行的东西来替换通过传统手动方式(人类操纵 GUI)可预测重复的东西。

我们在内部使用 AutoIT 来执行自动化测试,并考虑使用相同的方法来提供应用程序的无人值守处理,但我们不愿意,因为用户可能“意外”与应用程序并行交互执行预定的“自动化”,从而“打破”自动化。

由于不敢使用已知事件和固定参数构建我们自己的调度程序来控制预定义的一组操作,我应该评估/考虑哪些方法以及需要哪些工具?

附加信息: 有些人会在应用程序上下文中将此功能称为“批处理”。

I'm looking for information [I hesitate to infer "Best Practices"] for Automating Applications. I'm specifically referring to replacing that which is predictably repeatable through traditional manual means [humans manipulating the GUI] with something that is scheduled by the User and performed "Automatically".

We use AutoIT internally for performing Automated Testing and have considered the same approach for providing Unattended Processing of our applications, but we're reluctant due to the possibility of the user "accidentally" interacting with the Application in parallel with the execution of a scheduled "automation" and therefore "breaking" the automation.

Shy of building in our own scheduler with known events and fixed arguments for controlling a predefined set of actions, what approaches should I evaluate/consider and which tools would be required?

Additional Information:
Some would refer to this capability as "Batch Processing" within the application context.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

好听的两个字的网名 2024-07-20 05:42:20

一般来说,自动化 UI 是一种危险的做法。 对于短期问题来说,这可能是一个有用的技巧:我发现自己在某些情况下使用 AutoHotKey 运行一些繁琐的任务......但前提是该任务不值得编写代码来实现更改(即一次性, 15 分钟任务)。

否则,您可能会因某些屏幕响应迟缓、UI 不一致等而遇到运行不一致的问题。大多数应用程序都有可用的 API,在 99% 的情况下,不使用它会比获取和使用它痛苦得多。

在不幸但可能的情况下,没有 UI 并且您只能进行屏幕抓取/操作,执行自动化测试的工具可能是您所能得到的最好的工具。 它允许您验证应用程序的状态(在某种程度上),从而可以构建一些安全网。此外,我将专门使用一个工作站来完成此任务......键盘和鼠标被锁定远离好奇的用户。 (远程桌面或 VNC 风格的连接对此效果很好:您可以启动进程并断开连接,从而使其不易被篡改。)

但是,我认为这种方法只是作为绝望的最后手段。 操纵 API 是非常非常可持续的(我在那里得到了足够的“远”吗?)。

In general it is a hazardous practice to automate UIs. It can be a useful hack for a short term problem: I find myself using AutoHotKey to run some tedious tasks in some situations... but only if the task is not worthy of writing code to implement the change (i.e., a one time, 15 minute task).

Otherwise, you will likely suffer from inconsistent runs due to laggy response of some screens, inconsistent UIs, etc. Most applications have an API available, and not using it is going to be far more painful than acquiring and using it in 99% of cases.

In the unfortunate but possible situation that there is no UI and you are reduced to screen scraping/manipulating, a tool that performs automated testing is probably as good as you will get. It allows you to verify the state of the app (to some degree) and thus can build some safety nets in. Additionally, I would dedicate a workstation to this task... with the keyboard and mouse locked away from curious users. (A remote desktop or VNC style connection works well for this: you can kick off the process and disconnect, making it resistant to tampering.)

However, I would consider that approach only as a desperate last resort. Manipulating an API is far, far, far, far (did I get enough "fars" in there?) more sustainable.

故事灯 2024-07-20 05:42:20

如果我理解正确的话,您希望使用某种工具进行自动化处理,该工具将在给定的软件系统中执行预定义的操作列表。 这与自动化测试不同。

我强烈建议您避免使用用于测试的工具来执行处理。 许多主要软件系统都有公共 API,您可以使用它们来执行操作,而无需直接用户交互。 这是一种更加稳健和可靠的安排自动化流程的方法。 请联系您正在使用的软件的供应商,有时可以根据要求提供 API。

If I understand correctly, you want to do automated processing using some tool that will execute a predefined list of actions in a given software system. This being different from automated testing.

I would urge you to avoid using tools meant for testing to perform processing. Many major software systems have public APIs you can use to perform actions without direct user interaction. This is a much more robust and reliable way to schedule automated processes. Contact the vendor of the software you are working with, sometimes the API's are available upon request.

药祭#氼 2024-07-20 05:42:20

Godeke 和 Dave 绝对正确,如果可用的话,API 是最好的途径。 然而,实际上这有时是不可能的,你必须走 GUI 自动化路线。 除了前面提到的运行自动化的专用工作站之外,我还建议在一些审计跟踪中进行编码,以便在出现问题时更容易调试或回溯。 您的批处理自动化应该保留处理哪些记录、处理时间以及处理方式的详细日志。 您应该对其进行设置,以便记录本身(在本机应用程序中)反映它是通过自动化更新/处理的。 例如,如果每条记录都有一个可更新的注释/评论字段,则自动化应向该字段添加文本,例如“由自动化用户处理,2009-02-25 10:05:11 AM,帐户字段从“ABC123”更改为“ DEF456'" 这样,自动模式对于用户在 GUI 中手动提取记录来说将是显而易见的。

Godeke and Dave are absolutely correct that, if available, the API is the best route. However, practically this is sometimes not possible, and you have to go the GUI automation route. In addition to the previously mentioned dedicated workstation(s) to run the automation, I recommend coding in some audit trails, so that it is easier to debug or backtrack if problems arise. Your batch processing automation should keep a detailed log of what records were processed, when they were processed and how they were processed. You should set it up so that the records themselves (in the native application) will reflect that it was updated/processed via automation. For example, if each record has an updateable notes/comments field, the automation should add text to this field like "Processed by automation user, 2009-02-25 10:05:11 AM, Account field changed from 'ABC123' to 'DEF456'" That way, the automated mods will be readily apparent to a user manually pulling up the record in the GUI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文