Results 1 to 4 of 4

Thread: Reading a file containing function name, arguments and output, Ues it for test app.

  1. #1
    Join Date
    Oct 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Reading a file containing function name, arguments and output, Ues it for test app.

    hello all,

    I have to develop a test application for some API's and those API's i have to read from text file containing function name, arguments, and output are sapereted with tab... all API's are with different argumnet and i have to write a generic function that will read the file and get all the information from text file and use those information for test.

    i got succes upto some extends, i.e, i am able to read the text file and use those parameter of files for test, but how should i make it generic for all API's, now i dont have any idea to proceed. If you need that application thn i will attach that application for your reference..

    so can you suggest me how should i proceed to write that application..plssss

    regards
    kunal

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Reading a file containing function name, arguments and output, Ues it for test ap

    i got succes upto some extends, i.e, i am able to read the text file and use those parameter of files for test,
    It would help a lot if you could explain how you are reading the input file now, and in what way it is not generic.
    In addition, it would help if you posted a typical section out of the input file.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reading a file containing function name, arguments and output, Ues it for test ap

    try QSettings or do it with XML.

  4. #4
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reading a file containing function name, arguments and output, Ues it for test ap

    If I understand well you're basically looking for a parser, right? Now :
    • what data do you want it to generate?
    • what syntactic structure is it supposed to process?
    • how much performance do you need?
    • how much time are you ready to spend writing it?
    Answers to these questions would be good starting points for us to find some, at least partial, solutions...
    Current Qt projects : QCodeEdit, RotiDeCode

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.