.. _html:
.. index:: html
====
Html
====
you can use ``uitest run --html example.html?jstest`` to run your ``jasmine`` html unit tests
Example:
::
uitest jasmine html
run it with ``uitest run --html example.html`` (**wrong** method,see warning below) you may see:
.. code-block:: text
INFO [Browser]: Chrome start run
INFO [Browser]: Chrome is completed
-------------------------------------------------------------------------------------------
测试结果: 浏览器:Chrome 28.0 (Mac) | 用例总数: 0 | 失败用例总数: 0 | 错误数:0
-------------------------------------------------------------------------------------------
http://yize.taobao.com/demo/test/testhtml.html?_ut_=70440309
-------------------------------------------------------------------------------------------
.. warning::
It`s ``not correct`` if you see the ``above`` result,when you use ``--html`` method, you should know this details:
1. replace the jasmine native ``jasmine-html.js`` to our `jasmine-html.js `_
2. run command ``uitest run --html example.html?jstest``,pay attention to ``jstest``,it`s **required**
then run it you will see this:
.. code-block:: text
INFO [Browser]: Chrome start run
INFO [Browser]: Chrome is completed
-------------------------------------------------------------------------------------------
测试结果: 浏览器:Chrome 28.0 (Mac) | 用例总数: 1 | 失败用例总数: 0 | 错误数:0
-------------------------------------------------------------------------------------------
http://yize.taobao.com/demo/test/testhtml.html?jstest
test to be true
test to be true
expect true toBe true Passed.
-------------------------------------------------------------------------------------------