使用 selenium 实现非 GUI 应用程序的自动化
Automation of NON GUI application using selenium
我在 tomcat.My 上有一个 Web 应用程序 运行 应用程序在某些位置没有 GUI.It 处理文件并将值保存到数据库中并在某些位置生成一些输出文件。
我需要使用 selenium.This 自动测试此应用程序,包括文件创建、文件夹之间的文件移动等。
我的问题是
1.Is 可以使用 selenium 自动化这个非 GUI 应用程序吗?如何?
2.Is 可以使用 selenium 网络驱动程序包括这些文件创建、移动和数据库值检查
Selenium 的创建是为了 UI 上的自动化测试。您可以在页面对象模型上使用或直接在 findelement(或 findelements)上使用,但您必须提供一个定位器属性,它可以是 according to selenium documentation:
id
name
xpath
link_text
partial_link_text
tag_name
class_name
css_selector
所以如果你有这些定位器是的,但如果你没有,Selenium 不适合这个任务。也许您正在寻找 API 测试人员、单元测试人员或者您想要完成什么?
如果您查看 Selenium 的 主页,它清楚地提到:
Selenium is the most widely-used open source solution in building Test Automation for Web Applications. The suite of tools provided by Selenium results in a rich set of testing functions specifically catering to the needs of testing of web applications of all types. These operations are flexible and allows many options for locating UI elements and comparing expected test results against actual application behavior.
因为您的自动化测试要求是:
- 文件创建
- 文件夹之间的文件移动
看来 Selenium 可能不是合适的工具。
通过 Perl 或 Python 构建的框架可能更能满足您的要求。
我在 tomcat.My 上有一个 Web 应用程序 运行 应用程序在某些位置没有 GUI.It 处理文件并将值保存到数据库中并在某些位置生成一些输出文件。
我需要使用 selenium.This 自动测试此应用程序,包括文件创建、文件夹之间的文件移动等。 我的问题是
1.Is 可以使用 selenium 自动化这个非 GUI 应用程序吗?如何? 2.Is 可以使用 selenium 网络驱动程序包括这些文件创建、移动和数据库值检查
Selenium 的创建是为了 UI 上的自动化测试。您可以在页面对象模型上使用或直接在 findelement(或 findelements)上使用,但您必须提供一个定位器属性,它可以是 according to selenium documentation:
id
name
xpath
link_text
partial_link_text
tag_name
class_name
css_selector
所以如果你有这些定位器是的,但如果你没有,Selenium 不适合这个任务。也许您正在寻找 API 测试人员、单元测试人员或者您想要完成什么?
如果您查看 Selenium 的 主页,它清楚地提到:
Selenium is the most widely-used open source solution in building Test Automation for Web Applications. The suite of tools provided by Selenium results in a rich set of testing functions specifically catering to the needs of testing of web applications of all types. These operations are flexible and allows many options for locating UI elements and comparing expected test results against actual application behavior.
因为您的自动化测试要求是:
- 文件创建
- 文件夹之间的文件移动
看来 Selenium 可能不是合适的工具。
通过 Perl 或 Python 构建的框架可能更能满足您的要求。