I was able to create an automated test using C#. Before I start I needed to do a couple of steps in order to have a good environment to develop.
This is the setup I used:
- Windows 10 Pro
- Visual Studio 2017 Pro (Trial)
- InDesign CC 2017
Now the steps of how I did it:
- Start InDesign as admin to create a file so I could use as reference in my Visual Studio Project
- Create a new Console project (This was my case)
- Add the COM Reference to the project. In the tab COM, you will find a reference to an Indesign tlb file

Now to create an Indesign instance I used the following code:
Type inDesignAppType = Type.GetTypeFromProgID("InDesign.Application.CC.2017");
InDesign.Application myInDesign = (InDesign.Application)Activator.CreateInstance(inDesignAppType);
After this, to run an InDesign script I used:
String myString = myInDesign.DoScript("return \"My String\"", InDesign.idScriptLanguage.idJavascript, new object[] {""});
I hope my solution helps someone else.