<commit_before><?xml version="1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Testing Framework</title>
</head>


<body>
<div class="instructions">
<h1>Testing Framework</h1>
<h3>General information</h3>
There are different kind of tests:
<ul>
<li>junit:    used to test specific functionality of certain java components/classes see <a href="http://junit.org/">http://junit.org/</a></li>
<li>htmlunit: used to test the web pages (simulating user interaction) see <a href="http://htmlunit.sourceforge.net/">http://htmlunit.sourceforge.net/</a></li>
<li>canoo: used to test the web pages (simulating user interaction) see <a href="http://webtest.canoo.com/">http://webtest.canoo.com</a></li>
</ul>

<h3>How to run the tests</h3>
<p>
It's necessary to build yanel before running the tests.
</p>

<p>
If you want to run the htmlunit tests, you have to start tomcat and configure
the host and url in <code>$YANEL_HOME/src/test/htmlunit/local.htmlunit-properties.xml</code>.
</p>

<p>
Then execute in $YANEL_HOME: ./build.sh test
</p>

<p>
To run single tests standalone:
<pre>
cd $YANEL_HOME
./build.sh -f src/test/build.xml junit -Dtest.class.name=org.wyona.yanel.impl.map.MapImplTest
./build.sh -f src/test/build.xml htmlunit -Dtest.class.name=org.wyona.yanel.htmlunit.yanelwebsite.SimpleWebTest
</pre>
</p>

<p>
Some Canoo web-tests are located at

<pre>
src/realms/use-cases/yanel/src/test/canoo/
src/realms/yanel-website/src/test/canoo/
</pre>

See the README.txt files within these directories in order to run the Canoo web-tests.
</p>

<h3>How to write tests</h3>
<p>
Where to place core tests:
<br/>$YANEL_HOME/src/test/junit/
<br/>$YANEL_HOME/src/test/htmlunit/
<br/><br/>Where to place resource tests:
<br/>$YANEL_HOME/src/resources/MYRESOURCE/src/test/junit/
<br/>$YANEL_HOME/src/resources/MYRESOURCE/src/test/htmlunit/
</p>
<p><commit_msg>note about compiling added<commit_after><?xml version="1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Testing Framework</title>
</head>


<body>
<div class="instructions">
<h1>Testing Framework</h1>
<h3>General information</h3>
There are different kind of tests:
<ul>
<li>junit:    used to test specific functionality of certain java components/classes see <a href="http://junit.org/">http://junit.org/</a></li>
<li>htmlunit: used to test the web pages (simulating user interaction) see <a href="http://htmlunit.sourceforge.net/">http://htmlunit.sourceforge.net/</a></li>
<li>canoo: used to test the web pages (simulating user interaction) see <a href="http://webtest.canoo.com/">http://webtest.canoo.com</a></li>
</ul>

<h3>How to run the tests</h3>
<p>
It's necessary to build yanel before running the tests.
</p>

<p>
If you want to run the htmlunit tests, you have to start tomcat and configure
the host and url in <code>$YANEL_HOME/src/test/htmlunit/local.htmlunit-properties.xml</code>.
</p>

<p>
Then execute in $YANEL_HOME: ./build.sh test
</p>

<p>
To run single tests standalone:
<pre>
cd $YANEL_HOME
./build.sh -f src/test/build.xml junit -Dtest.class.name=org.wyona.yanel.impl.map.MapImplTest
./build.sh -f src/test/build.xml htmlunit -Dtest.class.name=org.wyona.yanel.htmlunit.yanelwebsite.SimpleWebTest
</pre>
</p>

<p>
NOTE: After compiling your resource with <code>./build.sh -f MY_RESOURCE/build.sh</code>, copy your newly generated lib to <code>build/webapps/yanel/WEB-INF/lib/</code>
</p>

<p>
Some Canoo web-tests are located at

<pre>
src/realms/use-cases/yanel/src/test/canoo/
src/realms/yanel-website/src/test/canoo/
</pre>

See the README.txt files within these directories in order to run the Canoo web-tests.
</p>

<h3>How to write tests</h3>
<p>
Where to place core tests:
<br/>$YANEL_HOME/src/test/junit/
<br/>$YANEL_HOME/src/test/htmlunit/
<br/><br/>Where to place resource tests:
<br/>$YANEL_HOME/src/resources/MYRESOURCE/src/test/junit/
<br/>$YANEL_HOME/src/resources/MYRESOURCE/src/test/htmlunit/
</p>
<p>
{'fraction_non_alphanumeric': 0.16851494696239153, 'fraction_numerical': 0.010125361620057859, 'mean_word_length': 4.388311688311688, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 2, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '831568', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1558, 'n_words': 390}