How to run java test files using Appium for android? - java

I'm very new for Appium. I have configured all my Win-7(64 bit) machine using this blog i.e Appium for windows, node.js and Android SDK with API level 17, emulator etc.
I found many java files on git-hub also in this blog also
but How to run this java files I don't have idea.
If anybody guide me step wise will be very helpful.
Thanks.

You can run the java test file using following command:
mvn -Dtest=com.saucelabs.appium.SimpleTest test
Note: You need to open terminal -> navigate to project directory --> execute the above command.
Refer to this link: Run Java Test File

For command line execution you can integrate your automation test with build tools.
Like Ant, Maven, Gradle. it can help you to execute and build automation test, also you can easily integrate with CI tools with the help of these.

Related

quarkus dev mode for CLI, how to restart app

I just created a sample Quarkus CLI app. When I run it in dev mode, pressing [enter] does not restart the application.
Steps to reproduce:
I am using the quarkus CLI, on macOS Big Sur, default Terminal app. I generate a default cli app with the following command:
quarkus create cli --group-id=test --artifact-id=test --maven --java --code
Then, once I am inside the test folder, I run:
quarkus dev
The example code runs and dev mode stays waiting for changes, but if I update the sample code and press [enter] on the terminal as described in the quarkus guide for CLI apps, the app is not rerun.
I also tried maven directly as suggested on the guide:
mvn compile quarkus:dev
But the result is the same.
The example generated is very simple, and uses Quarkus 2.0.1 with the picocli extension. Works fine when compiled and run standalone.
Does anyone know what am I missing?
Thanks for any suggestions.
I think what you are seeing is a bug in 2.0 cli where create cli does not create a cli but just the standard app. Thus it won't reload until you hit localhost:8080.
it will be fixed in next version. sorry for inconvenience.
In the mean time you can use https://quarkus.io/guides/command-mode-reference which explains the minimal code and dependencies needed for a Quarkus cli.
Does your project have any tests? The picocli project created by the cli doesn't by default (yet?).
https://github.com/quarkusio/quarkus/pull/18700 should fix your issue (behavior of dev mode for projects without tests).

How to configure Appium-Flutter-Driver in windows? Which IDE is preferable?

I'am new to Automation testing. I have to perform automation testing on Flutter app. I came across appium-flutter-driver through this link: [https://github.com/truongsinh/appium-flutter-driver][1].
Unable to configure the driver in my project. Currently using, IDE:Eclipse 2018-12, Build:Maven build using TestNg Java. I have installed the Appium-flutter-driver in my system using the given command "npm i -g Appium-flutter-driver" in GitHub. But unable to configure driver into my project. There is no ".jar" file.
Need Help:
How to configure the Appium-flutter-driver into project?
Which IDE is preferable to configure the driver and perform automation testing?
Thanks in Advance.
In order to install flutter driver, use command npm I appium-flutter-driver, which creates node modules directory in your project directory with flutter library. Later you need to import library in your file/class.
Hope this helps..Happy coding

Run Selenium Java Test in VSTS(Visual Studio Team Service)

I have written selenium java code to do the UI automation test in eclipse. Now, I want those code to be runed in VSTS. Problem is that there are lots of components which I am not clear how they are used under the tab "build & release". So I am looking for masters who can share with me the steps to achive my target. Thank you.
If the test need to be run in interactive way, you need to setup a build agent with Interactive mode. (e.g. Deploy an agent on Windows), then run test through this build agent.
There is the Maven task that can run java test.
A related article: Testing Java applications with VSTS

Jenkins + Github -- Trigger java program

I am a novice with Jenkins and wanted to know if it is possible to trigger a Java program (e.g. a hello world program) with Jenkins. For example, when any change is made in GitHub repository Jenkins should trigger this hello world program. Is this even possible using Jenkins? Can someone please help me with this? I will really appreciate your help.
You can use the Jenkins GitHub plugin to get notified when a push is made to GitHub, more details here: https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
Hope that helps.
Yes you can.
1.You can write shell script in post-recieve hook of GIT repository.
2.Whenever you push the code this hook is executed, your script can remotely call build-JOB on your Jenkins using jenkins-cli.jar
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
3.you can use maven or gradle build for your project.
4.Artifacts created from build job (ear,war,etc) can be deployed onto your application server using Jenkins Job(some shell scripting again)
GitHub Webhook from GitHub Plugin
Build -> Execute shell -> Command

Runnig eclipse from Jenkins

I have installed the Jenkins on my windows machine.
I am currently doing the functional testing of a website and i have created all the test cases using selenium . I ran all these testcases using eclipse with testng plugin.
Now is there any way where i can run these testcases in eclipse from Jenkins itself i.e Can i control the eclipse from Jenkins.
I am trying hard now and able to run it using batch command( i have written all the commands in a batch file to run the eclipse and selenium driver and that batch file is executed from Jenkins ) but i am in search of a plugin where i can run directly the eclipse , selenium web-driver using that plugin.
Please see to this issue.
Thanks.
You are on the right lines with a batch file, but I recommend you use Ant or Maven instead of Eclipse - they are the standard way of scripting builds in Java, and they have good Jenkins support.
Here is a plugin for Maven to start up Selenium before the tests: http://mojo.codehaus.org/selenium-maven-plugin/
Here is how to run your TestNG tests using Maven: http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html

Categories