当前位置: 动力学知识库 > 问答 > 编程问答 >

Go language Automation (how use selenium like browser automation)

问题描述:

I am new guy for GO language. looking for automation process to do web signup,login process. Please suggest me a good tool like selenium and how I can implement it in go language.

I want to do following process automatically using golang code

  1. browser start. (now am using https://github.com/skratchdot/open-golang )
  2. auto entry in signup page and auto submit form
  3. login check for

    the registered user. everything needs to be done auto for more

    users.

网友答案:

If you are going to use GO for web automation testing - Selenium is a good option. Still it's a nothing more than a library that allows you to interact with browsers. So you are going to need to develop your own framework or reuse someone already implemented.

My advice is to consider Agouti, since it supports Ginkgo BDD and xUnit Gomega. Everything else is pretty much the same from architectural perspective. You can design it like any other language binding. There are common patterns that appear over and over again in browser automation frameworks, like

  • PageObjects: A simple abstraction of the UI of your web app.
  • LoadableComponent: Modeling PageObjects as components.
  • BotStyleTests: command-based approach

Another good resource for building your Test framework is the xunitpatterns guide. It gives a great content overview of the patterns, smells and refactoring strategies you can use. Also look at this test frameworks tutorial. It'll help you choose the most proper solution for your case.

My guess is that you are going to need some CI server support for

everything needs to be done auto for more users.

Here is a good article how-to achieve this with TravisCI.

分享给朋友:
您可能感兴趣的文章:
随机阅读: