Testing primary task

General Tech QA/Testing 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on QA/Testing related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I would like to solve the following testing problem. If there is an error i.e. (=1/0) in a cell, the additional tests will not run after that. I would like to know how to solve this issue in the testing primary task part.

Private Sub ts_NoBlank(TsCn, STST, LsSt, LsIn, TsRw, MsCo, MsIC, MsSt)
    Dim TsCl, StRw, LsRw, TsSh

    TsCl = ColNrOfField(TsCn)
    StRw = FsRwOfField(TsCn) + 1
    LsRw = LsRwOfField(TsCn)
    TsSh = SheetOfField(TsCn)

' Setting up Status Updates
    PLcSt = -1 'Starting previous local status is set to -100% to show eitherways
    rws = LsRw - StRw
    'this part has to be copied to whenever showing the status (Value of LcSt has to be added each time by function)
    LcSt = 0
    If LcSt - PLcSt >= LsIn Then
        Call ShowStatus(MsSt & " (" & Application.WorksheetFunction.Text(LcSt, "0%") & ")", ThisWorkbook.Worksheets("Calculations Running").Range("Started"), STST + (LsSt - STST) * LcSt)
        PLcSt = LcSt
    End If

' Testing primary task
    ErrNr = 0
    For Rw = StRw To LsRw 'ToDo speed up with fromrow torow
        If Len(ThisWorkbook.Sheets(TsSh).Cells(Rw, TsCl)) = 0 Then
            ThisWorkbook.Sheets(TsSh).Cells(Rw, TsCl).Interior.ColorIndex = 46
            ErrNr = ErrNr + 1
        End If

        'Showing Local Status
        LcSt = 0.1 + ((Rw / LsRw) * 0.75)
        If LcSt - PLcSt >= LsIn Then
            Call ShowStatus(MsSt & " (" & Application.WorksheetFunction.Text(LcSt, "0%") & ")", ThisWorkbook.Worksheets("Calculations Running").Range("Started"), STST + (LsSt - STST) * LcSt
                                                
                                                
0 views
0 shares
profilepic.png
manpreet 2 years ago

 

Since you indicate that the ' Testing primary task section seems to work, but nothing after that seems to execute, I'd suggest that when you get here:

'Showing Local Status
LcSt = 0.1
If LcSt - PLcSt >= LsIn Then

this condition is false, so the code is never executed.

Then you get here:

' Highlighting erroneous cells (if not done during testing)
If ErrNr > 0 Then

End If

and there is no code to execute, no matter the value of ErrNr.

Then you get here:

'Showing Local Status 100%
LcSt = 1
If LcSt - PLcSt >= LsIn Then

and it's still evaluating False, so again it never executes.

Have you gone through in the debugger to look at the values and ensure everything is as you expect it to be?


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.