Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Test Scripts (Access 97)

    Hi

    Not sure this is the appropriate forum, but would appreciate some feed back on it.

    Our organisation is to upgrade its operating system from Windows NT to Windows 2000 or XP (likely the latter). Also, there is a good chance we will be moving from a fat wire to thin wire network. As part of this upgrade, they wish to test all DBs to determine whether the change in operating environment will affect them. Fair enough. However, as part of writing test scripts (ie me, as been the owner of 5 Access DBs) they wish I include actual test data into the test script (ie based on data I entered into the UAT versions under the current operating system). As you can appreciate this would involve quite a bit of extra work for me. The powers to be rationale for this are:

    1. Identical data be entered at both Proof of Concept and Pilot Testing (2 phases of testing) to produce an identical result at time of testing.
    2. If the data is not documented and the application performs differently at both phases of testing it becomes more difficult to isolate whether the problem as an application problem, an infrastructure problem or a data problem.
    3. Keeping the data the same makes life easier if different people are performing the testing at different phases.

    I admit I'm not expert in this area, but I have some issues with the above from a risk management perspective.

    1 These DBs have been around awhile, so the chances of some data entry eg a company name causing a bug is remote, otherwise it probably would have occurred before now.

    2 If it was causing a problem (ie a bug in the DB design) it would have occurred when I entered the test data in the first instance (ie the testing of the DB under the current environment).

    3 There is just as much chance of finding a problem with the new operating system by using random data for each part of the testing phase.

    4 Access 97 is not been upgraded. So, again the chances of any bug found by a test script (under the new environment) been related to DB design in Access is very small. Rather the bug is more than likely due to the new operating system.

    5 If by some small chance, a bug was found in the test script under the new environment was due to a DB design, then while I accept it may take longer to track down, it still would of needed addressing under the old operating system.

    In other words from my risk management perspective, the extra time involved is not worth it from a cost benefit perspective. However, I

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Test Scripts (Access 97)

    I've worked with Win2k for years and I run WinXP on my machine at work. Both of them handle Access 97 databases without any problems. I don't understand why you need to retest databases that have been working on NT systems. Win2k is built on the NT kernel, so there is not really much difference between the two except for additional features added in 2k. WinXP *is* different, but Access behaves the same on it as on the other versions.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Test Scripts (Access 97)

    Hi Charlotte

    Thanks for taking the time to comment, the advice was appreciated.

    I do have another question on a slightly different tack. All the DBs currently use a API to pull the Window NT login name. Under a windows XP environment, do you know (or point me in the right direction) what the equivalent code is as I will obviously have to change it for the windows XP environment.

    Thanks & Regards
    WTH

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Test Scripts (Access 97)

    Which API are you using now? There are several that can retrieve current user's network logon name. Here is one, using WNetGetUserA API function, that will work in WIN XP as well as earlier versions of Windows:

    Option Compare Database
    Option Explicit

    Const MAXLEN = 255
    Const NO_ERROR = 0

    Private Declare Function WNetGetUser Lib "mpr" Alias "WNetGetUserA" _
    (lpName As Any, ByVal lpUserName As String, lpnLength As Long) As Long

    Public Function apiGetUserName() As String

    Dim lngSize As Long
    Dim strUserName As String
    Dim lngRetval As Long

    lngSize = MAXLEN
    strUserName = Space(lngSize)
    lngRetval = WNetGetUser(0&, strUserName, lngSize)

    If lngRetval = NO_ERROR Then
    ' Get rid of C null-terminated string Null character:
    strUserName = Left$(strUserName, InStr(strUserName, Chr(0)) - 1)
    Else
    ' not successful:
    strUserName = ""
    End If

    apiGetUserName = strUserName

    End Function

    HTH

  5. #5
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Test Scripts (Access 97)

    Hi

    I'm using:

    Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    Function fOSUserName() As String ' Returns the network login name
    Dim lngLen As Long, lngX As Long
    Dim strUserName As String
    strUserName = String$(254, 0)
    lngLen = 255
    lngX = apiGetUserName(strUserName, lngLen)
    If lngX <> 0 Then
    fOSUserName = Left$(strUserName, lngLen - 1)
    Else
    fOSUserName = ""
    End If
    End Function

    I don't think this one works in XP??? Anyway thanks for the code, I'll test it out on a Windows XP machine.

    Thanks & Regards
    WTH

  6. #6
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Test Scripts (Access 97)

    I've used same API function. It should work correctly in any version of Windows (95 or later) - I've used it in Win 98, Win 2K, and Win XP w/no problems. Code I use:

    Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, ByRef nSize As Long) As Long

    Public Function GetLogonUserName()

    Dim lngSize As Long
    Dim strUserName As String
    Dim lngRtnVal As Long

    lngSize = 255
    strUserName = String(lngSize, 0)
    lngRtnVal = GetUserName(strUserName, lngSize)

    If lngRtnVal > 0 Then
    strUserName = Left(strUserName, lngSize - 1)
    Else
    strUserName = ""
    End If

    GetLogonUserName = strUserName

    End Function

    Note in general, if the API function works in WIN NT/WIN 2K, it should also work in WIN XP, which is based on WIN NT kernel. Some API's are NT specific & will not work in WIN 9X. Likewise there are some functions that only apply to WIN 9X. When in doubt, check the "documentation" (if you can find it), exceptions are usually noted. If you want to check the "source" (MS), look up API in question in the MSDN online Windows API Reference.

    HTH

  7. #7
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Test Scripts (Access 97)

    Hi

    Thanks for the advice. So in theory it should not be a problem (apart from Murphy's law kicking in).

    Regards
    WTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •