jbarker7 / sqlcc

SQL Code Coverage - SQLCC is a code coverage tool that allows developers the ability to track which lines of code within stored procedures, functions, and triggers have been tested in SQL server by integration tests written by the developer.
BSD 4-Clause "Original" or "Old" License
26 stars 22 forks source link

KeyNotFoundException #2

Closed ghostsquad closed 9 years ago

ghostsquad commented 11 years ago

SQLCC builds successfully, but when running, I get a KeyNotFoundException on

var startCommand = new StartCommand(outputProvider, dbProvider, arguments["app.traceName"]);

in Program.cs; line 58

It appears that another parameter "--app.traceName" is needed, but the readme doesn't explain what to put here.

jbarker7 commented 11 years ago

Basically, underneath the covers SQLCC creates a SQL trace file (trc) and it is asking for the name of that file minus the extension (i.e. could be "TraceFile"). The documentation does not reflect this change-- good catch. I will see if I can get this updated. To get you going, basically you can add this to the App.config as a default and not need to provide it via the command-line (this works if you intend to utilize the same trace file and do not have a need for separate trace files). Add this to your App.config (SQLCC.exe.config):

<add key="dbp.traceName" value="TraceFile" />
ghostsquad commented 11 years ago

Thanks for the reply. Might want to just add this key to the App.config file as default, and talk about changing it in the documentation. Does the TRC file get replaced everytime this is run if the filename is not changed?

Wes

On Wed, Mar 20, 2013 at 9:18 PM, jbarker7 notifications@github.com wrote:

Basically, underneath the covers SQLCC creates a SQL trace file (trc) and it is asking for the name of that file minus the extension (i.e. could be "TraceFile"). The documentation does not reflect this change-- good catch. I will see if I can get this updated. To get you going, basically you can add this to the App.config as a default and not need to provide it via the command-line (this works if you intend to utilize the same trace file and do not have a need for separate trace files). Add this to your App.config (SQLCC.exe.config):

— Reply to this email directly or view it on GitHubhttps://github.com/jbarker7/sqlcc/issues/2#issuecomment-15218811 .

jbarker7 commented 11 years ago

Yeah, I was thinking about this, but there are a few things to consider before doing this, which I am looking into.

As for the TRC file getting replaced, I need to test the behavior to find out if it would be replaced with each run (my guess is yes). Before the recent update, it would create a new trace each time it ran as "yyyyMMddHHmmssFFF".

jbarker7 commented 11 years ago

Please try now-- I have made a few fixes and optimizations. The biggest issue was one of our collaborators actually committed a change that required traceName as a parameter-- I changed this to optional to keep things simple.

jbarker7 commented 9 years ago

Closed due to no response