If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How do I unit test asp script. Need help with my ignorance

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-04, 11:05
Todd Barkus Todd Barkus is offline
Registered User
 
Join Date: Nov 2003
Location: down on the cube farm, left then right then another left
Posts: 467
How do I unit test asp script. Need help with my ignorance

Here is the URL I submit.

http://telus.wellsfargo.com:7777/doc...t/dev/2054.rdf

I do not get an error, but the expected result (insert into a table) does not happen). I have unit tested my stored procedure and that works fine. When I submit the above URL as I said nothing happens.

Here is the code for log.asp

Code:
<%@ Language=VBScript %>

<!-- 
include alert.asp
-->

<%
response.buffer = TRUE
response.expires = TRUE

On Error Resume Next




dim queryStr 
queryStr = request.QueryString("action")&request.form



    Set Comm = Server.CreateObject("ADODB.Command")
Comm.connectiontimeout = 60
    comm.ActiveConnection = "dsn=telus_iasdb;uid=reports;pwd=reports;"
    comm.commandtype=4   

    comm.commandtext = "log_hits"


    set param = comm.createparameter("InPut",200,1,500,querystr)
'    set param = comm.Parameters
'    param.append comm.createparameter(querystr,200,1)

comm.parameters.append param

    'Pass the input value
'    comm("InPut") = querystr


    comm.execute()



response.redirect(querystr)

%>
I believe my DSN is okay, but I do not have Excel etc. to verify. Any help on that would be appreciated also. I have turned on DSN tracing but I never see any data.

Sorry for my ignorance, appreciate the help.
__________________
NOTE: Please disregard the label "Senior Member".
Reply With Quote
  #2 (permalink)  
Old 12-14-04, 11:15
Todd Barkus Todd Barkus is offline
Registered User
 
Join Date: Nov 2003
Location: down on the cube farm, left then right then another left
Posts: 467
Okay. I see I broke the first rule. I didn't ask for what I wanted. My question is "Is the way I am trying to test a valid method" (no pun intended). Do I need to do something else to actually test my asp script? Of course if someone sees an error that would be helpful also.
__________________
NOTE: Please disregard the label "Senior Member".
Reply With Quote
  #3 (permalink)  
Old 12-19-04, 19:46
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
To test it you probably want to remove the redirection at the bottom and response.write some values out, such as your querystr value and then try calling your stored proc with that exact value....
Reply With Quote
  #4 (permalink)  
Old 12-20-04, 09:11
Todd Barkus Todd Barkus is offline
Registered User
 
Join Date: Nov 2003
Location: down on the cube farm, left then right then another left
Posts: 467
Thanks for you reply. I found some code that would display the error I was having. I then was able to fix the issue.
__________________
NOTE: Please disregard the label "Senior Member".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On