Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8020327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:39:56+00:00 2026-06-04T21:39:56+00:00

I’m developing a testing suite based on Selenium 2. The goal is to test

  • 0

I’m developing a testing suite based on Selenium 2. The goal is to test a series of pages under different situations (specified through an arbitrary XML file).

The output is given through:

  • Some zipped screenshots
  • A raw log file
  • An html file

Right now the raw log file and the markdown log file (later used to generate the html) is generated through messages hardcoded in the app.

Now I’m thinking of using some auxiliar data structures to contain every single piece of relevant info, using some kind of convention (codes, enums, etc.) to later process and present. If I’m not wrong, this should make the code easier to mantain and less redundant.

My question is: is there a better approach, or widely accepted practice, for this?

As an example of how the output (just a scratch) is:

<Test> | <name of page> | <browser>:
    * Searchbox found and query submitted
    * ERROR: timeout while waiting for results
<Test> | <name of page> | <browser>:
    * Question found and answer submitted
    * Alert box content: < ... >
    * OK

Thanks

PS: if anybody fins a more suitable question title, it’ll be more than welcome

Edit

Sorry if my question isn’t as concise as it should, I’m trying my best to make myself clear.

In other words, when my program has to output a potentially big amount of text giving information about the result of the tests executed, how should I do it? hardcode the messages or use some auxiliar data structure (something like a queue/pile) that keeps track of what had happened since the start to the end of the execution (be it error and status codes, for example) and then process it compose a readable document?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:39:59+00:00Added an answer on June 4, 2026 at 9:39 pm

    Using a presentation-independant data structure is obviously a better choice. It allows

    • decoupling the testing from the reporting
    • generating several kinds of reports (HTML, PDF, text, etc.)
    • internationalizing the reports
    • integrating the testing into another application which won’t do any reporting, but present the result in some GUI component (a tree or a table for example)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am trying to loop through a bunch of documents I have to put
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.