testdev/ite/src/com.nokia.testfw.stf.help/html/tasks/creating_scripts.htm
author Johnson Ma <johnson.ma@nokia.com>
Tue, 30 Mar 2010 14:39:29 +0800
changeset 1 96906a986c3b
permissions -rw-r--r--
contribute ITE to symbian foundation

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Creating scripts</title>
<link href="../../book.css" type="text/css" rel="stylesheet">
</head>
<body>

<h2>Creating scripts</h2>

<h4>Before you start</h4>
<p>In STF, you can create scripts that consist of a series of keywords and arguments, describing the operation of the test case. The Script Editor is an easy way to manipulate script files and offers syntax highlighting, code assistant, syntax checker and so on. </p>
<p>Scripts enable you to create advanced combinations of test cases, which can be suited for your development needs. For more background information, see <a href="../concepts/scripts.htm">Test scripts</a>.</p><p>To create a script, do the following:</p>
<ol>
<li>In the Project Explorer, right-click the .cfg file you want to use and select <b>Open With > STF Script Editor</b>.</li>
<li><p><img src="screenshots\script_editor_view.png" alt="Script editor"></p></li>
<li>To start creating the script text, enter the keywords and arguments that describe the test case's operation. <p>For more information on the keywords, see the reference topics <a href="../references/script_keywords.htm">Script keywords</a>.</p>
<p><b>Note:</b> The <code>title</code> keyword must be the first one. </p><p>For more tips on how to create and edit the script, see the section below. </p></li>
</ol>

<h4>Tips for working with the STF Script Editor</h4>
<ul>
<li>You can expand or collapse lines by clicking the plus or minus signs next to the given test case. </li>
<li>To get code assistance on the keywords, press CTRL + SPACEBAR. The suggested words depend on the context. </li>
<li>The editor provides validation for the syntax. If an error is found, any line containing it is marked and a comment is added to it in the <b>Problems</b> tab. <p>See the examples below: </p><p><img src="screenshots\script_editor_code_assist.png" alt="Example of code assist and error validation."></p></li>
<li>In addition, the <b>Outline</b> tab lists the test cases that the current file contains. Click a test case on the outline to move to the corresponding location in the script. See the example:
<p><img src="screenshots\script_editor_outline.png" alt="Outline view and the Script Editor"></p></li>
</ul>

<h4>Related references</h4><ul>
<li><a href="../references/script_keywords.htm">Script keywords</a></li>
</ul>

<div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
</body>
</html>