# Can't show the code coverage map - Answered

**URL:** <https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114>\
**Category:** Technical Support\
**Tags:** sui\
**Created:** [November 8, 2023, 2:30pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114 "2023-11-08T14:30:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GCB](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/gcb/32/16029_2.png) [@GCB](https://forums.sui.io/u/GCB)\
**Post date:** [November 8, 2023, 2:30pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114/1 "2023-11-08T14:30:30Z")

</div>

I used

```auto
sui move test --coverage --test

```

to generate the `.coverage_map.mvcov`  
When I want to show the map with

```auto
sui move coverage source --module vote

```

I get the error

```auto
error[E03002]: unbound module
   ┌─ ./sources/vote.move:82:12
   │
82 │ friend vote::vote_tests;
   │ ^^^^^^^^^^^^^^^^^^^^ Unbound module 'vote::vote_tests'

```

when using

```auto
sui move coverage source --module vote --test

```

I get the error:

```auto
(base) ➜ move git:(main) ✗ sui move coverage source --module vote --test 
thread 'main' panicked at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/str/mod.rs:658:13:
byte index 4294967206 is out of bounds of `;`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1] 709844 IOT instruction (core dumped) sui move coverage source --module vote --test

```

---

<div class="post-metadata">

**Author:** ![GCB](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/gcb/32/16029_2.png) [@GCB](https://forums.sui.io/u/GCB)\
**Post date:** [November 8, 2023, 2:50pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114/2 "2023-11-08T14:50:53Z")

</div>

Removing the line

```auto
friend vote::vote_tests;

```

and using

```auto
sui move coverage source --module vote

```

works.  
But why can’t I get it working with keeping this line?

---

<div class="post-metadata">

**Author:** ![GCB](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/gcb/32/16029_2.png) [@GCB](https://forums.sui.io/u/GCB)\
**Post date:** [November 9, 2023, 1:29pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114/3 "2023-11-09T13:29:08Z")

</div>

Adding a test\_only was required to remove the unbound error.

```auto
    #[test_only]
    friend vote::vote_tests;

```

---

<div class="post-metadata">

**Author:** ![rvt](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/rvt/32/2661_2.png) [@rvt](https://forums.sui.io/u/rvt)\
**Post date:** [November 9, 2023, 3:21pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114/4 "2023-11-09T15:21:29Z")

</div>

Hi! If you can throw together a minimal example of the source that triggers this we can look into it further, in case it’s not expected. If it’s expected to add `#[test_only]`, maybe we can add more helpful error messages when running the `coverage` command.

---

<div class="post-metadata">

**Author:** ![GCB](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/gcb/32/16029_2.png) [@GCB](https://forums.sui.io/u/GCB)\
**Post date:** [November 9, 2023, 5:20pm UTC](https://forums.sui.io/t/cant-show-the-code-coverage-map-answered/45114/5 "2023-11-09T17:20:16Z")

</div>

The ‘vote\_tests’ module was indeed under a tests folder.  
The unbound module error was key, a ‘sui move build’, ‘sui move prove’ also failed to work I figured out later.  
The issue in the end had not much to do with the coverage map.
