Missing filter for test cases in custom scripts #9794

Closed
opened 2025-12-29 21:22:47 +01:00 by adam · 6 comments
Owner

Originally created by @hackcl on GitHub (Jun 4, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.0

Python Version

3.10

Steps to Reproduce

  1. Run a custom script with multiple test cases
  2. See results
  3. Click on one of the test hyperlinks of the test cases in the "Test Summary"

e. g.:
image

Expected Behavior

Filter for log entries based on the specific test case.
In case of my example, by clicking on test_vrf_set, only show the log entires related to this test case

Observed Behavior

Nothing. Change in URL.
e.g.:
/netbox/extras/scripts/results/1200/?page=37#test_vrf_set

As it is an hyperlink, I would expect it to be filter.
If this is not the expected behavior, then I would propose it as a feature.

Originally created by @hackcl on GitHub (Jun 4, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.0 ### Python Version 3.10 ### Steps to Reproduce 1. Run a custom script with multiple test cases 2. See results 3. Click on one of the test hyperlinks of the test cases in the "Test Summary" e. g.: ![image](https://github.com/netbox-community/netbox/assets/43070830/a62558b0-158f-4323-bf85-db3a388a5d1c) ### Expected Behavior Filter for log entries based on the specific test case. In case of my example, by clicking on test_vrf_set, only show the log entires related to this test case ### Observed Behavior Nothing. Change in URL. e.g.: /netbox/extras/scripts/results/1200/?page=37#test_vrf_set As it is an hyperlink, I would expect it to be filter. If this is not the expected behavior, then I would propose it as a feature.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:22:47 +01:00
adam closed this issue 2025-12-29 21:22:48 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jun 4, 2024):

Thanks for reporting a problem you've encountered in NetBox.

Please provide more detail in your Steps to Reproduce, including a minimal script that enables a user to start from a fresh, empty install of NetBox and arrive at the problem behavior you describe. If it's necessary to create any objects along the way, please specify those items as well.

@jeffgdotorg commented on GitHub (Jun 4, 2024): Thanks for reporting a problem you've encountered in NetBox. Please provide more detail in your *Steps to Reproduce*, including a minimal script that enables a user to start from a fresh, empty install of NetBox and arrive at the problem behavior you describe. If it's necessary to create any objects along the way, please specify those items as well.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 12, 2024):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Jun 12, 2024): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@hackcl commented on GitHub (Jun 19, 2024):

Sorry, I was on vacation and forgot about it. I try to do it until beginning of next week.

@hackcl commented on GitHub (Jun 19, 2024): Sorry, I was on vacation and forgot about it. I try to do it until beginning of next week.
Author
Owner

@hackcl commented on GitHub (Jun 19, 2024):

I was able to do it quickly code a small script. It contains two duplicate test cases with different names.
It checks whether a tenant is set for the device but it is not relevant.

Script

example.zip.

Other Requirements

Some existing devices. Setting a tenant is irrelevant.

After Execution

After execution it should look like this.
image

Now I would expect if I click in the "Test Summary" on "test_if_tenant_is_set2" to only see log messages from this test case. This dont happen.

The only thing that changes if clicking on one of the two test cases is the url:
/netbox/extras/scripts/results/1372/#test_if_tenant_is_set
/netbox/extras/scripts/results/1372/#test_if_tenant_is_set2

@hackcl commented on GitHub (Jun 19, 2024): I was able to do it quickly code a small script. It contains two duplicate test cases with different names. It checks whether a tenant is set for the device but it is not relevant. ### Script [example.zip](https://github.com/user-attachments/files/15901519/example.zip). ### Other Requirements Some existing devices. Setting a tenant is irrelevant. ### After Execution After execution it should look like this. ![image](https://github.com/netbox-community/netbox/assets/43070830/7c786628-c9a4-4c30-bb7e-02036547e0b9) Now I would expect if I click in the "Test Summary" on "test_if_tenant_is_set2" to only see log messages from this test case. This dont happen. The only thing that changes if clicking on one of the two test cases is the url: `/netbox/extras/scripts/results/1372/#test_if_tenant_is_set` `/netbox/extras/scripts/results/1372/#test_if_tenant_is_set2`
Author
Owner

@jeremystretch commented on GitHub (Jul 2, 2024):

The page anchor is a remnant of the legacy report results view. It no longer has any function and can be removed.

@jeremystretch commented on GitHub (Jul 2, 2024): The page anchor is a remnant of the legacy report results view. It no longer has any function and can be removed.
Author
Owner

@hackcl commented on GitHub (Jul 3, 2024):

I don't think it should be removed as it would be quit helpful for cases with a lot of log entries.

I would try to implement it but I don't have the time currently.

@hackcl commented on GitHub (Jul 3, 2024): I don't think it should be removed as it would be quit helpful for cases with a lot of log entries. I would try to implement it but I don't have the time currently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9794