Hi,
I use STAF command "Get File" to retrieve the contents of the file
<stafcmd name = "'Parse the result file'">
<location>'local'</location>
<service>'FS'</service>
<request>'GET FILE %s TEXT FORMAT " "' % resultTxT</request>
</stafcmd>
<if expr="RC == 0">
<log message="1">'Get file successfully, file contains %s %s' %
(STAFResult, len(STAFResult)<log>
</if>
what does the function len(STAFResult) return? The total number of characters,
or the total number of lines?
What I am trying to do is to get the first line of the attach txt file and
check if it contains string "0 error". Can you suggest what is the best way to
do it?
Thanks,
Cindy
Plan Harmony.pln - 1 error
Machine: (local)
Started: 08:06:13AM on 26-Apr-2011
Elapsed: 0:02:32
Passed: 2 tests (67%)
Failed: 1 test (33%)
Totals: 3 tests, 1 error, 0 warnings
Software Information
Machine: (local)
Started: 08:06:13AM on 26-Apr-2011
Elapsed: 0:00:00
Totals: 0 errors, 0 warnings
Software Version: Version 2.1.0.72
Baseline Version: 2.1.0.68
Script started on 04/26/2011 at 08:06:13 AM.
Operating System is Windows 7 Professional
Scripts are developed on a machine with display resolution
1280*1024
The current resolution is 1280 * 1024
TC1369: Ensure Harmony can be launched and project can be created
Machine: (local)
Started: 08:06:13AM on 26-Apr-2011
Elapsed: 0:01:24
Totals: 0 errors, 0 warnings
Passed!
Import - Production Data
TC1240: Import Merak File and Verify Gas Production Data
Machine: (local)
Started: 08:07:37AM on 26-Apr-2011
Elapsed: 0:01:08
Totals: 1 error, 0 warnings
*** Script aborted by user
Occurred in TC1240 at Imports.t(826)
TC1241: Import Merak File and Verify Oil Production Data
TC1242: Import Merak File and Verify Water Production Data
TC1243: Import Merak File and Verify Condensate prodcution Data
TC1244: Import Merak File and Verify NGL prodcution Data
TC1245: Import Merak File and Verify C3H8 prodcution Data
TC1246: Import Merak File and Verify C4H10 prodcution Data
TC1247: Import Merak File and Verify Gas Injection Data
TC1248: Import Merak File and Verify Water Injection Data
TC1249: Import Merak File and Verify Condensate Injection Data
TC1250: Import Merak File and verify NGL Injection Data
TC1251: Import Merak File and Verify N2 Injection Data
TC1252: Import Merak File and Verify CO2 Injection Data
TC1253: Import Merak File and Verify Steam Injection Data
TC1254: Import Merak File and Verify Flowing Pressure Data
TC1255: Import Merak File and Verify Other Data
Import - Static Pressure
TC1256: Import Merak File and Verify Static Pressure Data
TC1257: Import Merak File and Verify Drilling Data
Import - Attributes Properties
TC1258: Import Merak File and Verify Entity Header Data
TC1259: Import Merak File and Verify Entity Status Data
TC1260: Import Merak File and Verify Political Data
TC1261: Import Merak File and Verify Geological Data
TC1262: Import Merak File and Verify Cumulative Data
TC1263: Import Merak File and Verify Drilling Data
TC1264: Import Merak File and Verify Operation Data
TC1265: Import Merak File and Verify Well Propertities Data
TC1266: Import Merak File and Verify Reservoir Propertities Data
TC1267: Import Merak File and Verify Oil Propertities Data
TC1268: Import Merak File and Verify Gas Propertities Data
TC1269: Import Merak File and Verify Shale Propertities Data
TC1270: Import Merak File and Verify Location Data
TC1271: Data Saving & Restoring and Verify Gas Production Data
TC1272: Data Saving & Restoring and Verify Oil Production Data
TC1273: Data Saving & Restoring and Verify Water Production Data
TC1274: Data Saving & Restoring and Verify Condensate Production Data
TC1275: Data Saving & Restoring and Verify NGL Production Data
TC1276: Data Saving & Restoring and Verify C3H8 Production Data
TC1277: Data Saving & Restoring and Verify C4H10 Production Data
TC1278: Data Saving & Restoring and Verify Gas Injection Data
TC1279: Data Saving & Restoring and Verify Water Injection Data
TC1280: Data Saving & Restoring and Verify Condensate Injection Data
TC1281: Data Saving & Restoring and Verify NGL Injection Data
TC1282: Data Saving & Restoring and Verify N2 Injection Data
TC1283: Data Saving & Restoring and Verify CO2 Injection Data
TC1284: Data Saving & Restoring and Verify Steam Injection Data
TC1285: Data Saving & Restoring and Verify Flowing Pressure Data
TC1286: Data Saving & Restoring and Verify Other Data
TC1287: Data Saving & Restoring and Verify Entity Header Data
TC1288: Data Saving & Restoring and Verify Entity Status Data
TC1289: Data Saving & Restoring and Verify Political Data
TC1290: Data Saving & Restoring and Verify Geological Data
TC1291: Data Saving & Restoring and Verify Cumulative Volume Data
TC1292: Data Saving & Restoring and Verify Drilling Data
TC1293: Data Saving & Restoring and Verify Operations Data
TC1294: Data Saving & Restoring and Verify Well Properties Data
TC1295: Data Saving & Restoring and Verify Reservoir Properties Data
TC1296: Data Saving & Restoring and Verify Oil Properties Data
TC1297: Data Saving & Restoring and Verify Gas Properties Data
TC1298: Data Saving & Restoring and Verify Shale Properties Data
TC1299: Data Saving & Restoring and Verify Locations Data
TC1227: Make sure the auto mapping works for bring in the same file
twice
TC1228: Multiple File Auto Mapping
TC1229: Text File Unlinking in Auto Mapping
TC1234: Test the application under test picks up on some Cumulative
Volumes dates
TC1238: Verify all the PVT Correlations are calculationg correctly when
seeting the Oil Properties accordingly
Report Summary
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users