html - Integrating javascript unit tests in an existing webpage -


i have javascript functions test in context of webpage. clear, these javascript functions closely coupled web-page. manipulate kinds of gui related stuff on webpage. unit-test web-page , not javascript functions.

i able test functionality in original webpage.

however, testing suites qunit require add code page start-up test suite. problem new html web-page not contain code.

a trivial solution copy-paste original html page test-suite page. "filthy" solution require me copy html page test-suite-page each time.

in c++/java test code include/import original code , needs, in html lack proper include statement.

what proper solution this?

it seems you're trying perform browser test, , not pure javascript one.

check if selenium fits needs. can use interact page , check presence or absence of text, or run javascript code in context of page and, again, check effects.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -