2
Vote

Unit Testing the add-in

description

comments

martinstuder wrote Oct 1, 2012 at 7:30 AM

More ideas:
  • Maybe it is possible to create an Outlook profile on the fly (using .pst files)

martinstuder wrote Oct 8, 2012 at 11:10 AM

Some more links:

martinstuder wrote Dec 20, 2012 at 7:44 AM

Creating a separate Outlook profile might unnecessary complex and laborious.
It might be enough to use .pst-files and use the unit tester's account.
Possible steps:
  1. The developer creates a separate .pst files for the unit tests.
  2. The unit test
    2.1 Loads the .pst into Outlook as separate store
    2.2 Tells our OMC code to work with this store only
    2.3 Does the testing
    2.4 Closes/Removes the stores loaded in step 2.1

wrote Dec 20, 2012 at 7:45 AM

wrote Jan 15, 2013 at 5:34 AM

ltogg wrote Jan 21, 2013 at 7:21 AM

Running only the "ordered tests" of the solution:

Test->Windows->Test View and selecting my ordered tests and then running it.

http://social.msdn.microsoft.com/Forums/en-US/vsunittest/thread/d5ee4170-f749-4f17-95c0-e7fa0befc481

Maybe there is a better way...

ltogg wrote Jan 22, 2013 at 5:50 AM

How to add a store:

Basically it's:

nameSpace.AddStoreEx(@"C:\temp\lokay-m.pst", Outlook.OlStoreType.olStoreUnicode);

ltogg wrote Jan 22, 2013 at 7:50 AM

How to generate .pst files from the Enron dataset from http://people.cs.umass.edu/~ronb/enron_dataset.html :
  1. Download and install "The Bat!" (a mail client) from http://www.ritlabs.com/ Import mails (folder by folder) using Hilfsmittel -> Nachrichten importieren -> Type: .msg/.eml -> Select all mails in folder
  2. Export mails from The Bat! in .eml format by dragging all mails from a (The Bat!) folder to a windows folder or using Hilfsmittel -> Nachrichten exportieren.
  3. Install tool from OutlookFreeware.com called "Import Messages from EML format" and import .eml files.

ltogg wrote Jan 22, 2013 at 10:35 AM

wrote Jan 22, 2013 at 10:37 AM

ltogg wrote Feb 11, 2013 at 1:49 PM

Mail in the lokay-m set, that doesn't get sorted into its original folder:

articles -> 9. Nov. 2001: "El Paso Maintenance on Lines 1300 and 1301 on San Juan Crossover"

wrote Feb 13, 2013 at 8:49 PM

ltogg wrote Feb 26, 2013 at 11:32 AM

How to debug in unit tests:

Start tests like this:

Test -> Debug -> ...

ltogg wrote Feb 26, 2013 at 1:26 PM

Result from discussion with Martin:

In unit test: Check if Outlook was manually started. If not, print error message and stop the unit test.