# TestItemRunner doesn't reload changed test case

**URL:** https://discourse.julialang.org/t/testitemrunner-doesnt-reload-changed-test-case/126099
**Category:** VS Code
**Tags:** testing
**Created:** [February 20, 2025, 5:16am UTC](https://discourse.julialang.org/t/testitemrunner-doesnt-reload-changed-test-case/126099 "2025-02-20T05:16:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bdforbes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bdforbes/32/215363_2.png) [@bdforbes](https://discourse.julialang.org/u/bdforbes)
#### Post date: [February 20, 2025, 5:16am UTC](https://discourse.julialang.org/t/testitemrunner-doesnt-reload-changed-test-case/126099/1 "2025-02-20T05:16:08Z")

</div>

I am using Julia in VS Code and running individual tests with `TestItemRunner` and the `@testitem` macro. I am finding that if a `@test` case line is changed _just a bit_, e.g. changing a number by a single digit, the change doesn’t seem to be picked up and the test is re-run as if nothing had changed.

Very minimal example:

`TestPkg.jl`:

```julia
module TestPkg

export foobar

foobar() = 3

end

```

`my_tests.jl`

```julia
@testitem "My tests" begin
    @test foobar() == 3
end

```

When I run that test via the testing pane, it passes. But I can change the `3` to a `4` and the test will still pass. If I change it to `44` it will then fail.

Is this a bug, or perhaps something that can be configured to make it more “sensitive” to changes?

---

<div class="post-metadata">

### Author: ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)
#### Post date: [February 20, 2025, 7:14pm UTC](https://discourse.julialang.org/t/testitemrunner-doesnt-reload-changed-test-case/126099/2 "2025-02-20T19:14:09Z")

</div>

I also noticed something similar recently with correct functionality being recovered when deleting and then reintroducing the specific changed line

---

<div class="post-metadata">

### Author: ![bdforbes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bdforbes/32/215363_2.png) [@bdforbes](https://discourse.julialang.org/u/bdforbes)
#### Post date: [February 20, 2025, 7:32pm UTC](https://discourse.julialang.org/t/testitemrunner-doesnt-reload-changed-test-case/126099/3 "2025-02-20T19:32:27Z")

</div>

Glad to know it’s not just me - and I did find the same behaviour with removing the entire line. It’s a bit of a gotcha that it’s not actually referring to the test file on disk when running the test, but instead relying on a cache that clearly only updates when at least a few keystrokes have been made.
