I see the ambiguity that you are trying to fix.  I couldn't think of anything better, but then I realized: using the term "offline" is, in itself, ambiguous.  In other scenarios, offline is treated as an error.

So, I think this solves the problem:

```
When my computer turns off test mode
```

Note that signaling the server that it is doing so is simply an implementation detail.  Or, if we decide it that we want that info, we could do this:

```
When my computer turns off test mode
And it sends its status to the server
```

but, after thinking about it for a minute or two, I don't think the added line helps much.  What do you think?