TeamCity says success but the msi doesn't load - testcomplete

I'm running TeamCity agent(not as a service).I'm using command line to launch an application.if i save the command line in a *.cmd file and double click it the application is loading properly but if i copy ans paste the code from the cmd file to TeamCity and run... TeamCity says success but the application is not loading.if i run TeamCity as a service and click the run... it is loading the application but,along with it it is loading an "Interactive Services Detection"(http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx)and that as i understood is not good so,i need to run it using the agent.bat file which is what i'm doing.
what can be the solution for this problem?
thanks

I got the agent service running by:
opening Services (cmd => services.msc)
right clicking on agent service (default is TeamCity Build Agent Service)
Selecting the Log On tab
Disabling 'Allow service to interact with desktop'

Related

Unable to execute the windows bash script on Jenkins slave

As a part of regression testing need to run the bash script on windows machine which actually open the chrome browser and traverse the website and generate the test report.
when i try to execute it through jenkins all the test cases are getting failed as its unable to open the browser, the same is getting passed when we logon to the remote windows server and execute the script manually.
NOTE: Have provided the same credentials on jenkins slave windows service
found below log on event manager
Activation of app Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI failed with error: This app can't be activated by the Built-in Administrator. See the Microsoft-Windows-TWinUI/Operational log for additional information.
Could you please help me here..
Hi can you enable the option Allow service to interact with desktop for the jenkins slave service on your windows slave machine.
You can enable it by going In services.msc > right click on service name > Properties > Log On > Allow service to interact with desktop

Debug jHipster application

I'm new to jHipster, I've created APIs which are consumed by my application's front end. I want to debug my services but unable to attach debugger with IntelliJ.
My application starts by running command "mvnw" which is jHispter standard command when I opened this bat file in editor i found this :
#REM e.g. to debug Maven itself, use
#REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
I setup MAVEN_OPTS environment variable but still it was of no use. I also tried to make a remote connection from IDE on port 8000 but still, it didn't serve a purpose.
Any help will be appreciated, thanks.
you can just run (in debug mode) the main method in the JhipApp Class (the SpringBootApplication Class). It worked for me
My tested and proven solution for debugging and then dividing the front end with the back ends, works for OS Windows and Ubuntu with the use of the latest version of the Ide Intellij Community (2020.1.1 used in both OS), provides that after creating a jhipster app (created with Ubuntu), from the command promp or from the Ubuntu shell launch the command: mvn -DskipTests = true clean install to compile the back end first and then the front end (in Angular 8 in my case), at the end of this compilation run the following command: mvn spring-boot: run.
After launching the application, click Ctrl + C and stop the run. Now you can launch the npm commands and then the command: npm start from the same command prompt or from the shell, since your project has been built and already launched it will be restarted and now from the Ide you can launch your class configuration annotated with #SpringBootApplication from the debug icon, at the end of the compilation you will have front ends and back ends divided and debuggable easily as well as hot changes for the front end take place quickly, while for the back end you will always have to save recompile and restart in debug.
You can do it, if you connect remotely, as you suggested in your question
Start jhipster in the terminal, but pass in some debug params
$ ./mvnw -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
Then you just connect to it using your IDE at port 5005.
For example, in Visual Studio Code
add a "launch.json" file
A "Add Configuration" button will be displayed when you have the launch.json as the active file in the editor. Click it.
Choose "Java: Attach by Process Id"
That will add a new configuration to the "Run and Debug" tab.
Click the "Attach by Process ID", button, and choose your process (port 5005 in this example)
Debugging will begin!

VSTS change agent state from offline to online after installing it

i'm facing a problem with VSTS agent state is offline i installed the agent through cmd under the right pool and downloaded after that but it still offline any help please ?
If the build agent is running as interactive mode, you need to start agent by running run.cmd file:
Open Command line as administrator
Run run.cmd file (under agent folder)
If the build agent is running as service, you can check whether the related service is running in Services.

Jenkins : Selenium GUI tests not visible in browser when I click build w/o using command prompt

I simply want to navigate to Jenkins, click build, and see the test execution in the browser. I don't want to use the command java -jar jenkins.war in the command prompt to get the browser to appear when I run my automated test. Any possible solutions?
They have a solution here
Solution 1: Enable "Allow service to interact with Desktop"
Tried it, it didn't work on my machine running in Windows 10
Solution 2: Through CMD using jenkins.war

Is there any way to open the CMD through teamcity so it will open and displayed on the desktop?

I have a batch job that i want to deploy from Teamcity to several servers,
to access several servers i use Winexe tool.
the batch is running but i can't see the session because it's started from teamcity,
but i can see that its running when looking at the process list.
My issue is that sometimes this job is having some errors,
which are being displayed on the cmd window when i run it manualy
but since i'm running it through TeamCity i can't see the CMD window so i can't see the error.
My question is:
Is there any way to open the CMD through teamcity so it will open and displayed on the desktop when i access the server as the same user?
note: bare in mind that i need to deploy it to several servers so i can't install several
agents via ZIP File.
So I found kind of a work-around to solve this problem,
I created a schedule task in windows that will run my batch.
when creating this task you need to set those settings:
1.) Run as: the user name that TeamCity is logging in.
2.) check the Run only if logged on check box.
3.) in the security tab give the user you use full permitions.
In order to run the schedule task you need to run this batch script:
Schtasks.exe /Run /TN name_of_schedule_task

Resources