You don’t need to have dedicated machine with windows or to give up using Linux or Mac just because you need to test your work on IE or Edge.
Here how you can run IE and Edge on Ubuntu. It should work on any other Linux or MAC OS. You don’t need to have windows licence or perform the system installation.
1. Download VirtualBox
Here’s the official oracle download page:
Run the installation:
sudo dpkg -i virtualbox-5.2_5.2.6-120293_Ubuntu_xenial_amd64.deb
2. Get Microsoft official image
Download the image with the IE version that you need to test.
Unpack it and run the file. It will set everything automatically in the VirtualBox.
To navigate to localhost you can use default gateway IP address.