Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Reading .properties file (Problem in reading a ,properties file using an ECL Command )
Reading .properties file [message #1761222] Tue, 09 May 2017 08:21 Go to next message
Radman sheikh is currently offline Radman sheikhFriend
Messages: 2
Registered: May 2017
Junior Member
Hi ,

I am following the official documentation of ECL in which there is a reference of reading .properties file
http://download.xored.com/q7/docs/ecl-api/latest#read-lines

get-item "General Registers/pc" | get-property "values[\'Value\']"
| matches [format "%s.*" [read-properties -uri "file:/C:/Users/Administrator/Desktop/p.properties" | get myKey]] | verify-true

Can anybody guide me through that in which pattern this p.properties file is written because when I try to execute the above line of code it gives me this error on the very first line of get-item

java.lang.NullPointerException
at get-item (/sampletestproject/importexport.test:3)




Re: Reading .properties file [message #1763748 is a reply to message #1761222] Fri, 19 May 2017 09:39 Go to previous message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Radman,

NullPointerException appears because you don't have a 'General Registers/pc' item.

.properties file must contain properties in 'key=value' format one per line, for example:
property1=value1
property2=value2
Previous Topic:RCPTT 2.0 and test count with super contexts
Next Topic:Setting a preference context using ECL language?
Goto Forum:
  


Current Time: Thu Apr 25 22:34:22 GMT 2024

Powered by FUDForum. Page generated in 0.02310 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top