If your game has two players (one controlled by the server and one controlled by the client), then both the server and the client should have versions of both characters (they both see each other). So there is a server version of A (controlled by server) and B (controlled by client), as well as a client version of each. In your example, you were probably modifying the test variable on the server for character A, which then replicated to the client’s version of A. When you were logging out the information on the client though, you were probably logging character B.
Based on your number 4, that does sound like your replication is working correctly. In the general case, you want to avoid writing code that allows the client machine to modify a replicated variable locally or you can get the server and client out of sync, like you can see in your number 5. As for modifying the variable of the client’s characters, there are a few different things you could do. One is to find the character as a result of some gameplay operation…so as an example with health, a weapon might do a line trace and hit a particular character and then you could modify variables on the hit character. Alternatively, you could iterate over all of the characters on the server and modify each one at once if you just want to test things. Take a look at uses of UWorld::GetPawnIterator(). You could try to cast each pawn to your test character class, then set the variable on the server there. The third option would be if you wanted the client to initiate the change on its own character, then you could write one of those server functions that in its implementation changes the value and then have the client call that server function, which will request that the server execute the function, which will change the value.