在多个页面上自动执行javascript和html测试

时间:2022-12-05 13:54:25

We have a webshop and we sell lots of items. Our checkout process consists of 4 different pages where the user has to input their address, select a delivery method and confirm their order on different pages/urls. Each of those pages relies on communication with the server and lots of javascript / jquery.

我们有一个网上商店,我们卖很多东西。我们的结账流程包含4个不同的页面,用户必须输入他们的地址,选择交付方式并在不同的页面/网址上确认他们的订单。每个页面都依赖于与服务器的通信以及大量的javascript / jquery。

Some of our users have reported problems at some parts of those pages. We suspect it could be a combination of OS/browser that can't understand a part of our javascript code.

我们的一些用户在这些页面的某些部分报告了问题。我们怀疑它可能是OS /浏览器的组合,无法理解我们的javascript代码的一部分。

Is there any way to automate testing of a checkout process of 4 different consecutive pages, each requiring user input? We would like the testing environment to test on different brosers/browser versions. We also had a customer recently that had an antivirus program that would change the urls of our js source files, is there any way to capture cases like that by testing?

有没有办法自动测试4个不同连续页面的结账过程,每个页面都需要用户输入?我们希望测试环境能够测试不同的brosers /浏览器版本。我们最近有一个客户有一个防病毒程序,它会改变我们的js源文件的网址,有没有办法通过测试来捕获这样的案例?

2 个解决方案

#1


2  

Sounds like you might use E2E testing, using Protractor/Selenium.

听起来你可能会使用Protractor / Selenium进行E2E测试。

It's basically about writing user behaviour, and the browser driver does it instead of user. You can write what should happen on the page and if any of these conditions is not met, it will be included in the post-test report. You can configure it to use whatever browser driver you like.

它基本上是关于编写用户行为,而浏览器驱动程序则是代替用户。您可以编写页面上应该发生的事情,如果不满足任何这些条件,它将包含在测试后报告中。您可以将其配置为使用您喜欢的任何浏览器驱动程序。

#2


0  

I suggest you to take a look at Selenium. The main purpose of it is to automate browsers actions.

我建议你看看Selenium。它的主要目的是自动化浏览器操作。

#1


2  

Sounds like you might use E2E testing, using Protractor/Selenium.

听起来你可能会使用Protractor / Selenium进行E2E测试。

It's basically about writing user behaviour, and the browser driver does it instead of user. You can write what should happen on the page and if any of these conditions is not met, it will be included in the post-test report. You can configure it to use whatever browser driver you like.

它基本上是关于编写用户行为,而浏览器驱动程序则是代替用户。您可以编写页面上应该发生的事情,如果不满足任何这些条件,它将包含在测试后报告中。您可以将其配置为使用您喜欢的任何浏览器驱动程序。

#2


0  

I suggest you to take a look at Selenium. The main purpose of it is to automate browsers actions.

我建议你看看Selenium。它的主要目的是自动化浏览器操作。