If I start a battle in a war, but click "end attack' before I attack, will this still count as one of my attacks in the war?
I think since the last update you can not end the battle without loosing. I just did it to myself. I started the battle and realised I wanted to check the range of the dudes cc. I hit end and bam I got 0 out of 3 stars and now only have one attack left. I also watched the replay. 19 seconds of nothing. No troops or spells deployed.
Whether you are doing a regular attack or if you attack during a war, you can exit without losing your attack/trophies as the condition that you did not deploy any single troop on the map.
This is something I personally experienced in a war, where I suddenly realized that I only had half of my troops available. I exited and I was still able to attack later on.
Nope. You will not lose. I have tried this personally a few weeks ago. As long as the 30 seconds doesn't run out, or you place any troops or spells, you will be fine. If you do accidentally drop in a spell or troops, or the timer runs out, you should just go through with the attack.
Good luck with your war and have fun! :)