Solved

How to test the webpart that is in a class library

Posted on 2011-09-25
1
354 Views
Last Modified: 2012-05-12
I have the class library where I have the web part logic and I want to test the webpart but don't have any excutable to run. Visual Studio 2008 says I have to have an executable to test it. Not sure the best way to test. I have my own sharepoint site and site collection and MOSS 2007 installed on windows server 2008 R2.

Please give an example of how I can test the webpart. This is a project developed by someone else but want to test this.
0
Comment
Question by:vmandem
1 Comment
 
LVL 18

Accepted Solution

by:
Gary Davis earned 80 total points
ID: 36595706
I often use LinqPad to test things like this - even if it has nothing to do with Linq. You load the dll reference to your class library and then type a few lines of C# code to call the class library function and display the returned response using the LinqPad Dump() statement.

It works similar to a C# interpreter.

See http://www.linqpad.com. I found it worth it to spend the extra $$ to get the Intellisense option but the free version is otherwise full-featured.

Gary Davis
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now