Open source library to create browser tests 10x faster

栏目: IT技术 · 发布时间: 5年前

内容简介:Free and open source library to create

QA Wolf

Create browser tests 10x faster

Free and open source library to create Playwright / Jest browser tests and run them in CI

:rocket: Get Started | :book: API | :wave: Chat | Roadmap

Open source library to create browser tests 10x faster

Install

Documentation

Set up your project for browser tests:

cd /my/awesome/project
npm init qawolf
# or yarn create qawolf

Configure your test directory and CI provider:

? rootDir: Directory to create tests in (.qawolf)

? Choose CI Provider (Use arrow keys)
  Azure DevOps
  Bitbucket Pipelines
  CircleCI
❯ GitHub Actions
  GitLab CI/CD
  Jenkins
  Skip CI setup

This will install qawolf , jest and playwright as dev dependencies and create a CI workflow file to:

  • :racehorse: Run tests in parallel
  • :video_camera: Record a video of each test
  • :page_facing_up: Capture browser logs

:art: Create a test

Documentation

npx qawolf create url [name]

:muscle: Convert your actions into Playwright code:

Action Status Example
Click :white_check_mark: page.click(selectors['0_submit'])
Type :white_check_mark: page.type(selectors['0_username'], 'username')
Scroll :white_check_mark: qawolf.scroll(page, 'html', { x: 0, y: 200 })
Select :white_check_mark: page.selectOption(selectors['0_ice_cream'], 'chocolate')
Replace text :white_check_mark: page.fill(selectors['0_username'], 'username')
Paste :white_check_mark: page.type(selectors['password'], 'pasted')
Use a test attribute :white_check_mark: page.click("[data-qa='submit']")
Use a test attribute on an ancestor :white_check_mark: page.click("[data-qa='radio'] [value='cat']")
Use multiple pages/tabs :white_check_mark: qawolf.waitForPage(page.context(), 1)
Iframes Coming soon
Drag and drop Coming soon
File upload Coming soon
Back button Coming soon

As your test is created:

  • :pencil2: Edit the code as you like
  • Use the REPL to try out commands

:white_check_mark: Run your tests

Documentation

On Chromium:

npx qawolf test [name]

On Firefox:

npx qawolf test --firefox [name]

On Webkit:

npx qawolf test --webkit [name]

On all browsers:

npx qawolf test --all-browsers [name]

:raising_hand: Get help

We want QA Wolf to work for you, so please reach out to get help!

If you have a feature request or feedback, please open an issue or chat with us .

:memo: License

QA Wolf is licensed under BSD-3-Clause .


以上所述就是小编给大家介绍的《Open source library to create browser tests 10x faster》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

奇点临近

奇点临近

Ray Kurzweil / 董振华、李庆成 / 机械工业出版社 / 2011-10 / 69.00元

人工智能作为21世纪科技发展的最新成就,深刻揭示了科技发展为人类社会带来的巨大影响。本书结合求解智能问题的数据结构以及实现的算法,把人工智能的应用程序应用于实际环境中,并从社会和哲学、心理学以及神经生理学角度对人工智能进行了独特的讨论。本书提供了一个崭新的视角,展示了以人工智能为代表的科技现象作为一种“奇点”思潮,揭示了其在世界范围内所产生的广泛影响。本书全书分为以下几大部分:第一部分人工智能,第......一起来看看 《奇点临近》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试