What is the maven command line I use to debug a codenameone project in simulator? - codenameone

I migrated my "ant" codename one project to maven using the app converter provided by CodeNameOne.
I want to use only maven command lines to debug.
Please, Could you write out the maven's command to do that?

In the IDO you can just press the debug button. It will launch the simulator in debug mode. There's no special command to run. If you do that from the command line you would need to initiate remote debugging which can work but you'll eventually need JDB or an IDE to connect to the app.
See How to remote debug java application from maven command line

Related

How to debug reactjs from command line and attach it to chrome debugger

I'm new to reactjs, I created a project using the init command, and run the sample using the npm start however I was wondering if there is a way to run it on debug mode and attach it to the chrome debugger. I have tried something like node --inspect-brk=127.0.0.1:9229 .\node_modules\react-scripts\bin\react-scripts.js start however this just debugs the react-script.js file and I guess this is expected, but this is the only way I know to run a reactjs program.
NOTE: I have tried debugging with vscode however I'm interested on knowing what will be the procedure from command line.
Thanks in advance!

TestNG Executable JAR files

Is the TestNG Executable JAR files alone is enough to work with TestNG framework or the TestNG plugin is essential? I have the JAR files, can i add to my library and work with TestNG?
Plugin just simplifies running things. You do not need it so to say. But, if you say want to run a single test or a suite file - a plugin would give you a simple way to right click and trigger it off. But with no plugin you will have to run with the java run command or through maven command if that's what you are running.
So the answer is yes - you can run but the plugin will always help while you are developing your tests.

How can one import the whole webDriver project in an executable form so that anybody else can run the suite by just a click.?

I am relatively new to Selenium WebDriver and a self learner. I have created a webDriver project which consists of different packages and have made use of Page Factory concepts extensively. I use TestNg framework to run the suite to generate my report. So my test cases are also following the TestNG framework concepts.
Now my team wants to use my script to be run at every build to test the sanity. The build team just wants to run my whole script by just a click. It can be shell script command or .exe or jar. Build team uses linux m/c and they dont have Ecplise , TestNg installed in their machine. Their intention is whenever build is given they want to run my script by just a click or a command in Command Prompt.( it has to be that simple for them) and a report should be generated in some location in hdfs
My script runs on FF version 32 and Selenium webDriver 2.44.0
Would really appreciate if someone could give me a solution that actually works for my requirement.
I found a similar query from someone but i am not sure if the answer still suits.
How to make Java executable Jar file of WebDriver project
Could somebody please give me a solution. Or the solution mentioned in the above link stil is the best?
Regards
There are few ways to do it:
Use CI tool (Jenkins): You can set up your project in Jenkins and it will allow you to run the project in single click. Jenkins also provides you an option to run the tests periodically so you can configure it in such a way that it will always get executed after certain time period.Jenkins is also capable to trigger the execution if there is any changes in source code of tests. I'd suggest to use this tool. https://jenkins-ci.org/
Use .bat or .sh file: I am not sure if you are using any build tool like ANT or Maven, if you are using any one of them then you can write a .bat or .sh file to run the tests. ANT
If you are not using any build tool then start using, it will help to run the tests in simplest way.For me to run entire suite, I just type below command in terminal from root directory of project
ant run -Dsuite=all
If you are more concerned about system configuration for e.g. the system which will be used by build team does not have a specific version of browser or specific required library. Then I'd suggest to keep all essentials like browser installation files, libraries in your project directory. This is not a good practice but yes it will help others to run the tests smoothly.
I would suggest just exporting a jar file for your project. All the libraries will be packaged together in the jar files(including TestNG) and you can simply double click on the jar file to start your tests.
External resources (if any), will have to be available for the jar file though. So, you can provide the jar file and the external resources together. The external resources might include your test data (if any) or Portable Firefox(if you are using the portable version).
Steps:
Right click on Project -> Export -> Runnable jar file
Give a name and file path for the jar file
Select option - Extract required libraries into generated JAR
And Finish
Troubleshooting:
Check the java version for the machines that you will be running your jar file on. Programs compiled with java 7 will mostly not run if the machine has java 6. Either compile with java 6 or update the jre on the target machines.
If the jar file does not launch, try using Jarfix.

Debugging AngularJS Code in JHipster (Intellij)

I am running Application.java from within IntelliJ and Grunt Serve from the Command Window. Thus, I can debug Java code and Live Reload changes to Html. But I cannot set breakpoints or trace Javascript files.
I know I could debug in Chrome, but I rather debug in IntelliJ if at all possible.
I would appreciate any suggestions.
Thanks
You should be able to do this with the NodeJS plugin for IntelliJ. I have it installed on my machine and I'm able to right-click on my project's Gruntfile.js and select Run or Debug.

Creating App Package through Command Line in WinRT

How can I create, WinRT App package through command line. What i am trying to achieve is, By executing a .BAT file i need to build and create app package of my windows 8 application(.sln). I build the source code using msbuild command. But i don't know how to create app package using command. Anyone please help
Running msbuild command on the project should both build the project and generate the packages.

Resources