在django中创建功能测试的帮助程序,具有用于webtest和selenium测试的统一api。
django-functest的Python项目详细描述
=====
django函数测试
=====
…图片::https://travis-ci.org/django-functest/django-functest.png?branch=master
:目标:https://travis ci.org/django functest/django functest
…图片::https://coveralls.io/repos/django-functest/django-functest/badge.svg?branch=master&service=github
:目标:https://coveralls.io/github/django-functest/django-functest?分支=主
…图片::https://readthedocs.org/projects/django-functest/badge/?version=latest
:target:https://django functest.readthedocs.org/en/latest/
django中创建高级功能测试的帮助程序,webtest和selenium测试使用统一的api
文档
----
完整文档位于https://django functest.readthedocs.org.
installation
----
::
pip install django functest
另请参阅"依赖项文档"
<;http://django functest.readthedocs.io/en/latest/installation.html"依赖项">在django中(检查整个视图或视图集的
行为的测试,例如签出过程)。
*webtest
<;http://webtest.pythonpaste.or g/en/latest/>;``和'selenium
<;https://pypi.python.org/pypi/selenium>;``同时编写两个测试!
*使用WebTest和Selenium的许多问题和困难已经解决了
为您解决了。
*经过良好测试-以及它自己的测试套件,它是针对Firefox
和Chrome运行的,它也被"wolf&badger
<;https://www.wolfandbadger.com/>;``用于覆盖许多关键业务功能的测试特性。
/>def test_contact_form(self):
self.get_url('contact_form')
self.fill({''id_name':'joe',
''id_message':'hello'})
self.submit('input[type=submit]')
self.asserttextpresent("感谢您的消息")
class contactwebtest(contacttestbase,funcwebtestmixin,testcase):
pass
class contactSeleniumtest(contactTestBase,funcSeleniummixin,liveServerTestcase):
pass
这样,您就可以使用高级API编写单个测试,并以两种方式运行它—使用快速的、基于wsgi的方法,该方法模拟浏览器的典型http使用情况,并且使用一个真正执行javascript的完整浏览器(如果有的话)
等
ixins,这样您就可以拥有自己的测试基类了。
贡献和测试
——
为django functest贡献的信息。
credits
----
这个库是由"wolf&badger
<;https://www.wolfandbadger.com/>;``经
公司许可发布。
用于呈现此包的工具:
*cookiecutter
*`cookiecutter djangopack`
。_ Cookiecutter:https://github.com/audreyr/Cookiecutter
。_` Cookiecutter djangopack`:https://github.com/pydanny/Cookiecutter djangopack
历史记录
----
1.0.4
+或者幽灵。(对于phantomjs,没有实际功能的改变)。
1.0.3
++代替"按ID填充({'foo':'bar'})``you
应该做``fill({'foo':'bar'}````,因为它更短更灵活。
*针对最新的Firefox
*django 2.0兼容性进行测试
*针对django 1.11.2和更高版本的多线程LiveServerMixin
1.0.2
+/>*修复以处理WebTest2.0.28。我们现在需要django webtest 1.9.2或
更高版本,并且只针对最新的webtest进行测试。
*修复了一些不推荐的警告
>1.0.1
+++br/>
*修复了与django webtest 1.9.0和更高版本的不兼容性
+1.0
+
*添加了django 1.11支持。
*放弃了官方Django 1.7支持(可能仍然有效)。
>0.2.1
++.new_browser_session`和
:方法:`~django_functest.funccommonapi.switch_browser_session`切换到公共
api。这些可用于模拟多个设备或用户访问
站点。有关重要用法信息,请参见文档。
0.1.9
++.10兼容性
0.1.7
++/>100%
*新方法:meth:`~django_functest.funceleniummixin.get_webdriver_options`
用于自定义webdriver行为。
0.1.5
+br/>+br/>
*添加了get_session_data()
*提高了"funceleniummixin.get_literal_url()`
*允许``<;select>;``ele要使用整数设置值的项。
*修复了单选按钮和文本区域的"`.value()`"问题
*修复了当窗体中有多个单选按钮时设置单选按钮的错误。
0.1.4
++++br/>
*增加了对文件上载的支持
0.1.3
+++br/>
*支持填充单选按钮
*更方便地支持文本断言方法中的引号和撇号(")。
>0.1.2
++
0.1.1
+++
django函数测试
=====
…图片::https://travis-ci.org/django-functest/django-functest.png?branch=master
:目标:https://travis ci.org/django functest/django functest
…图片::https://coveralls.io/repos/django-functest/django-functest/badge.svg?branch=master&service=github
:目标:https://coveralls.io/github/django-functest/django-functest?分支=主
…图片::https://readthedocs.org/projects/django-functest/badge/?version=latest
:target:https://django functest.readthedocs.org/en/latest/
django中创建高级功能测试的帮助程序,webtest和selenium测试使用统一的api
文档
----
完整文档位于https://django functest.readthedocs.org.
installation
----
::
pip install django functest
另请参阅"依赖项文档"
<;http://django functest.readthedocs.io/en/latest/installation.html"依赖项">在django中(检查整个视图或视图集的
行为的测试,例如签出过程)。
*webtest
<;http://webtest.pythonpaste.or g/en/latest/>;``和'selenium
<;https://pypi.python.org/pypi/selenium>;``同时编写两个测试!
*使用WebTest和Selenium的许多问题和困难已经解决了
为您解决了。
*经过良好测试-以及它自己的测试套件,它是针对Firefox
和Chrome运行的,它也被"wolf&badger
<;https://www.wolfandbadger.com/>;``用于覆盖许多关键业务功能的测试特性。
/>def test_contact_form(self):
self.get_url('contact_form')
self.fill({''id_name':'joe',
''id_message':'hello'})
self.submit('input[type=submit]')
self.asserttextpresent("感谢您的消息")
class contactwebtest(contacttestbase,funcwebtestmixin,testcase):
pass
class contactSeleniumtest(contactTestBase,funcSeleniummixin,liveServerTestcase):
pass
这样,您就可以使用高级API编写单个测试,并以两种方式运行它—使用快速的、基于wsgi的方法,该方法模拟浏览器的典型http使用情况,并且使用一个真正执行javascript的完整浏览器(如果有的话)
等
ixins,这样您就可以拥有自己的测试基类了。
贡献和测试
——
credits
----
这个库是由"wolf&badger
<;https://www.wolfandbadger.com/>;``经
公司许可发布。
用于呈现此包的工具:
*cookiecutter
*`cookiecutter djangopack`
。_ Cookiecutter:https://github.com/audreyr/Cookiecutter
。_` Cookiecutter djangopack`:https://github.com/pydanny/Cookiecutter djangopack
历史记录
----
1.0.4
+或者幽灵。(对于phantomjs,没有实际功能的改变)。
1.0.3
++代替"按ID填充({'foo':'bar'})``you
应该做``fill({'foo':'bar'}````,因为它更短更灵活。
*针对最新的Firefox
*django 2.0兼容性进行测试
*针对django 1.11.2和更高版本的多线程LiveServerMixin
1.0.2
+/>*修复以处理WebTest2.0.28。我们现在需要django webtest 1.9.2或
更高版本,并且只针对最新的webtest进行测试。
*修复了一些不推荐的警告
>1.0.1
+++br/>
*修复了与django webtest 1.9.0和更高版本的不兼容性
+1.0
+
*添加了django 1.11支持。
*放弃了官方Django 1.7支持(可能仍然有效)。
>0.2.1
++.new_browser_session`和
:方法:`~django_functest.funccommonapi.switch_browser_session`切换到公共
api。这些可用于模拟多个设备或用户访问
站点。有关重要用法信息,请参见文档。
0.1.9
++.10兼容性
0.1.7
++/>100%
*新方法:meth:`~django_functest.funceleniummixin.get_webdriver_options`
用于自定义webdriver行为。
0.1.5
+br/>+br/>
*添加了get_session_data()
*提高了"funceleniummixin.get_literal_url()`
*允许``<;select>;``ele要使用整数设置值的项。
*修复了单选按钮和文本区域的"`.value()`"问题
*修复了当窗体中有多个单选按钮时设置单选按钮的错误。
0.1.4
++++br/>
*增加了对文件上载的支持
0.1.3
+++br/>
*支持填充单选按钮
*更方便地支持文本断言方法中的引号和撇号(")。
>0.1.2
++
0.1.1
+++