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 8067459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:18:12+00:00 2026-06-05T12:18:12+00:00

I am trying to create a test framework and not sure what is best

  • 0

I am trying to create a test framework and not sure what is best to use to store test case names and data that will be provided in XML file. For example, I want to test printer functionality so it has constructor, open printer connection, send data to printer, close printer connection. So the XML would be:

<Printer>
  <TestCaseName>"Printer_Construct"</TestCaseName>
    <Data1>"Printer1"</Data1>

  <TestCaseName>"Printer_OpenConnection"</TestCaseName>
    <Data1>"Printer1"</Data1>

  <TestCaseName>"Printer_PrintString"</TestCaseName>
    <Data1>"Printer1"</Data1>
    <Data2>"Printing my string"</Data2>

  <TestCaseName>"Printer_CloseConnection"</TestCaseName>
    <Data1>"Printer1"</Data1>
</Printer>

Here is how my test framework wanted to work:

1- when test operator runs the test framework, first it will load all the case names only into listbox1. It will not load test case data yet.

2- when test operator selects specific test case to run, it will load that test case into listbox2. So when it loads test case into listbox2, it will display test case name and test data(data1 and data2 as shown in xml struct above).

3- So now that test case in listbox2 is ready to be tested whenever test operator clicks the Run button.

So how can I store test case data? Should I store these data in memory? If so, what storing data feature should I use? If not storing these data in memory, does that means I will have to read the XML every time when accessing to test case data so is it good practice to do that?

thanks.

  • 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-05T12:18:15+00:00Added an answer on June 5, 2026 at 12:18 pm

    If you define the test cases in XML, then you might benefit from defining its structure in an XML Schema Definition file and using a tool to generate in-memory data structures as well as the deserializer (automated reader) from that .xsd file. The tool will provide you with a C# file that you can include in your program. You will be surprised how easy to work with this representation can be.

    However, before you start, while your XML structure may work in this very simple initial case, it does not seem very maintainable. If the “data” nodes logically belong to the “test case” node that precedes them, it should be so even in the XML structure, like this:

    <Printer>
        <TestCaseName Name="Printer_Construct">
            <Data1>"Printer1"</Data1>
        </TestCaseName>
    
        <TestCaseName Name="Printer_PrintString">
            <Data1>"Printer1"</Data1>
            <Data2>"Printing my string"</Data2>
        </TestCaseName>
    </Printer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a JQuery function that will test a string for the
I am trying to create a unit test for a method that takes a
I am trying to test a WPF application using the UI-Automation framework that MSFT
I am trying to create an initial-data.yml file for a Play! Framework application. Part
I'm trying to write a unit-test to verify that it's impossible to create an
What I am trying to do is create a map generator that will create
I'm trying to find a unit test framework, for the .NET platform, that can
I am trying to create my first unit test. I use Zend Studio, and
I am trying to create a unit test framework using CPPUnit for a large
I'm trying to use LINQPad with my MVC3 project that is using Entity Framework

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.