471,325 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

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
Jun 27 '08 #1
3 1367
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 (ji****@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:
ms****@microsoft.com.

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

Jun 27 '08 #2
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 (ji****@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:
ms****@microsoft.com.

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

Jun 27 '08 #3
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 (ji****@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:
ms****@microsoft.com.

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

Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Hugh Cowan | last post: by
14 posts views Thread by | last post: by
4 posts views Thread by Peter Rilling | last post: by
72 posts views Thread by Jacob | last post: by
4 posts views Thread by Dat AU DUONG | last post: by
176 posts views Thread by nw | last post: by
48 posts views Thread by Ark Khasin | last post: by
4 posts views Thread by Smokey Grindel | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.