Hi, thank you for the comment.
Xp gain depends of the monster you defeat. Exemple: 2xp is soldier, hobbit is 1xp, vampire is 6xp, etc...
You need to fill your experience bar AND click on button to level up.
It 's not automatic, intentionally: there is a optimal moment to level up (when the HP are the lowest).