{"id":50,"date":"2007-06-10T15:28:00","date_gmt":"2007-06-10T22:28:00","guid":{"rendered":"http:\/\/sp2hari.com\/?p=50"},"modified":"2020-06-20T08:54:30","modified_gmt":"2020-06-20T08:54:30","slug":"running-a-test-case","status":"publish","type":"post","link":"https:\/\/sp2hari.com\/index.php\/2007\/06\/10\/running-a-test-case\/","title":{"rendered":"Running a test case &#8230;"},"content":{"rendered":"<p>Having written the test scripts for Firefox, this time going to tell how to test Firefox with these scripts. The test scripts can be found <a href=\"http:\/\/people.freedesktop.org\/%7Enagappan\/firefox.tar.gz\">here<\/a><\/p>\n<p>There is a <a href=\"http:\/\/ldtp.freedesktop.org\/wiki\/How_to_execute_scripts\">wiki page<\/a> in LDTP website which gives quick tips about how to run LDTP test cases.<\/p>\n<p>First quick steps to get LDTP installed . If you have LDTP already installed, then you can skip this.<\/p>\n<p><span style=\"font-weight: bold;\">Installation<\/span><br \/>\nGet the source\/binary from the <a href=\"http:\/\/ldtp.freedesktop.org\/wiki\/Download\">downloads section<\/a> of LDTP web page. Any other dependencies which LDTP might need while installation is libxml2 and libat-spi. (I generally install the debug and dev packages of the above two). After this installation of LDTP shouldn&#8217;t have any issues \ud83d\ude42<\/p>\n<p><span style=\"font-weight: bold;\">Runner XML<br \/>\n<\/span>Runner XML files makes testing many test cases one after another in a batch mode easy. A sample runner XML can be found <a href=\"http:\/\/ldtp.freedesktop.org\/wiki\/Sample_ldtprunner_XML\">here<\/a>. A very simple runner XML needed to run a single test case will be like<\/p>\n<p><ldtp><group style=\"font-style: italic;\">&lt;ldtp&gt;<br \/>\n&lt;logfileoverwrite&gt;1&lt;\/logfileoverwrite&gt;<br \/>\n&lt;logfile&gt;log.xml&lt;\/logfile&gt;<br \/>\n&lt;group&gt;<br \/>\n&lt;script&gt;<br \/>\n&lt;name&gt;verifyaddress-autocomplete.py&lt;\/name&gt;<br \/>\n&lt;data&gt;firefox.xml&lt;\/data&gt;<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/group&gt;<br \/>\n&lt;\/ldtp&gt;<\/group><\/ldtp><\/p>\n<p><group>The tags are self explanatory.<br \/>\nYou can have any number of script blocks and thereby test any number of test cases one after another. The data tag is not necessary but it is better to have a separate data file.<br \/>\n<\/group><br \/>\n<span style=\"font-weight: bold;\">Test<br \/>\n<\/span>Well, that&#8217;s all you have to do. Start Firefox and then<\/p>\n<p><span style=\"font-style: italic;\">hari@home:~$ ldtprunner run.xml<\/span><\/p>\n<p>The above command starts testing the application with the test case provided in the run.xml .<\/p>\n<p>Note :: It is also possible to test simply by giving<\/p>\n<p><span style=\"font-weight: bold;\"><\/span><span style=\"font-style: italic;\">hari@home:~$ python verifyaddress-autocomplete.py<\/span><\/p>\n<p>But i prefer doing it using runner XML, as that has more features.<\/p>\n<p>There is a complete tutorial for LDTP <a href=\"http:\/\/freeshells.ch\/%7Esp2hari\/soc\/ldtp-tutorial.pdf\">here.<\/a> This explains everything needed to write a test script clearly and is worth reading \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having written the test scripts for Firefox, this time going to tell how to test Firefox with these scripts. The test scripts can be found here There is a wiki page in LDTP website which gives quick tips about how to run LDTP test cases. First quick steps to get &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":2,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/50\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}