Solved

How to test the webpart that is in a class library

Posted on 2011-09-25
1
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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