Unit Testing VS2008

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?c2lwcHl1Y29ubg==?=

    #1

    Unit Testing VS2008

    Hi

    I have setup UnitTests that go thru a SQL Server Table Sequentially using the
    UntTest Property for DataSource.

    What if I need to use 2 tables - I have a Parent child table that I need to
    process
    Do I do the db coding manually like I would in regular C# code by writing
    SELECT statments and looping thru datasets ???

    Let me know if there is a better newsgroup for this question

    Thanks
  • Jialiang Ge [MSFT]

    #2
    RE: Unit Testing VS2008

    Hello sippyuconn,

    One TestContext is designed for one SQL Server table in the Data-Driver
    unit test of Visual Studio 2008. As a possible workaround, we can consider
    building a View in the database for the two tables (Parent-Chiled table),
    and consume the view in the test function. In addition, we may also build
    two test method, and set the two tables for them respectively. I'm looking
    for other workarounds and I will be back to you as soon as possible.

    Regards,
    Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
    Microsoft Online Community Support

    =============== =============== =============== ====
    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    msdnmg@microsof t.com.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    =============== =============== =============== ====

    Comment

    • =?Utf-8?B?c2lwcHl1Y29ubg==?=

      #3
      RE: Unit Testing VS2008

      Hi

      Thanks for looking into this.
      What I am trying to do is some blackbox testing but also I can set the state
      of the blackbox


      Table 1 - BlackBox settings
      key settings
      1 string of "|" separated values
      2 string of "|" separated values


      Table 2 - Blackbox Input Values - Foreign Ties Table2 to Table 1 settings
      key foreign key input expected results
      1 1 string of csv
      2 1 string of csv
      3 1 string of csv
      4 1 string of csv
      5 2 string of csv
      6 2 string of csv
      7 2 string of csv
      8 2 string of csv





      "Jialiang Ge [MSFT]" wrote:
      Hello sippyuconn,
      >
      One TestContext is designed for one SQL Server table in the Data-Driver
      unit test of Visual Studio 2008. As a possible workaround, we can consider
      building a View in the database for the two tables (Parent-Chiled table),
      and consume the view in the test function. In addition, we may also build
      two test method, and set the two tables for them respectively. I'm looking
      for other workarounds and I will be back to you as soon as possible.
      >
      Regards,
      Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
      Microsoft Online Community Support
      >
      =============== =============== =============== ====
      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.
      >
      This posting is provided "AS IS" with no warranties, and confers no rights.
      =============== =============== =============== ====
      >
      >

      Comment

      • Jialiang Ge [MSFT]

        #4
        RE: Unit Testing VS2008

        Hello sippyuconn, in the pass few days, I've been researching and
        discussing it with the Visual Studio team. I am sorry that we do not find a
        better workaround than the ones in my intial reply. We are aware that there
        are places we can improve for cross-table unit test. The product team has
        recorded this feature. Thank you, sippyuconn, for sharing this user
        experience with us. Without the input of numerous intelligent and
        warmhearted customers like you, our MSDN Managed Newsgroup can never be as
        comprehensive and helpful as it is today. I appreciate your time and
        efforts working with us.

        Would you please let me know whether there is anything we can do for you.
        If you have any comments on our support service, website design, our
        product limitation, our process, and etc., please don't hesitate to let me
        know. I will do my best to follow up.

        Thanks
        Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
        Microsoft Online Community Support

        =============== =============== =============== ====
        Delighting our customers is our #1 priority. We welcome your comments and
        suggestions about how we can improve the support we provide to you. Please
        feel free to let my manager know what you think of the level of service
        provided. You can send feedback directly to my manager at:
        msdnmg@microsof t.com.

        This posting is provided "AS IS" with no warranties, and confers no rights.
        =============== =============== =============== ====

        Comment

        Working...