How can I run all tests that are inside a folder in Protractor without adding it as a suite to the config file - protractor

Hi does anyone know how you can either make a folder executable in Protractor or create a separate folder/module to run all the tests that are inside a folder?

protractor protractor.conf.js --specs='specs/*.js'
The above cmd will execute all the files in specs folder.
--spec is used to specify where your test files are residing.

Related

How to start with protractor automation using jasmin

I am new to protractor. I started to automate a small application using protractor. My question is do we create the project straight away using package.json by mentioning dependencies or
Do we install selenium , protractor through command prompt then write scripts. Once all done and working fine, then build the project using package.json again?
Please some one clarify me.
Thanks in advance
Protractor is used for end to end testing of another web project
You can create a separate folder called e2e in your project folder.
You can use the same package.json file, but create a new configuration file for e2e.
In the npm scripts you can first, build the project first and then run the test script.
Finally, I would say that a separate project is not required, as they are part of the same application.
I have worked on a couple of protractor projects. Feel free to ask anything.
Hope this answers your question.
You can create a simple project by downloading angular CLI project onto your workspace.
You can refer to any angular CLI site or video to start with. You will get all needed folders to start with, like e2e, src, etc and files like package.json, protractor conf etc.

How to deploy Akka-HTTP project to Ubuntu Server?

I am using sbt-native-packager.
I added following code to build.sbt
enablePlugins(JavaAppPackaging)
I run this command in sbt shell
sbt stage
Universal folder has been created.
And My project runs with this command in my Windows Computer. No any problem.
./target/universal/stage/bin/MyProjectName.bat
But I want to deploy on Ubuntu Server.
I could not run .bat command in Ubuntu.
What do I need to do?
In the directory ./target/universal/stage/bin/ there will be an executable script with the same name with no extension.
On the linux server, run ./target/universal/stage/bin/MyProjectName and the application will start. Make sure you copy everything in the stage folder, including bin and lib.
I highly recommend that you use one for the packagers. Universal packager will create a zip file that you can extract anywhere.

Javascript Protractor - Is there any solution to run protractor test with remote node_modules?

I'm writing automation test for the angularjs web app. Using protractor and cucumber.
From beginning, I organized the test as a separate folder and actually it required different node packages from the root project(the project built up the web app).
Today there's a requirement that the node_modules of test project should be merged with the node_modules of root project.
As per my knowledge, when running the command protractor protractor_conf.js, the system looks for the node_modules in 1 level upstream folder.
I'm attaching the screenshot of my project folder to be clearer.
Appreciate all suggestions !
Thanks.
I will not recommend you not to save node_modules as the separate folder in the project directory. Instead, you can create a package.json file for your test project and list all the dependencies in the package.json file. so each time before you run protractor conf.js ,just run npm install command from the directory where your project is available. So by doing this way will help you to run the e2e scripts in different machines without depending on the node_modules folder.
Example package.json for protractor
Also, it is advisable to maintain separate node_modules for different project because it may avoid versions conflicts of any node_module that is used in both projects.

Cassandra Setup and Use In Eclipse

I am facing a problem when I'm trying to use Git Bash to ant build.
Before that I would like to show my Environment Variable.
1) Extract Cassandra folder into D:/Program Files (x86)/Cassandra-trunk
2) Extract apache-ant-1.9.1 into D:/Program Files (x86)/Cassandra-trunk
After that I run Git Bash and input the command as below.
$cd D:/'Program Files (x86)'/Cassandra-trunk/apache-ant-1.9.1/bin
$ ant build
The error message:
Buildfile: build.xml does not exist.
Build failed.
I used to put build.xml into the /bin but error too.
Is there any method I can fix this problem?
Reference:
http://wiki.apache.org/cassandra/RunningCassandraInEclipse
http://uisurumadushanka89.blogspot.com/2012/02/apache-cassandra-how-to-setup-source.html
After you have cloned cassandra source code into cassandra-trunk you will find build.xml file into cassandra-trunk folder. So instead of:
$cd D:/'Program Files (x86)'/Cassandra-trunk/apache-ant-1.9.1/bin
you should do:
$cd D:/'Program Files (x86)'/Cassandra-trunk/
This is where build.xml file resides. Now run ant build from above directory. Please make sure that you have included ant folder into your environment build path variable otherwise you would not be able to run ant executable directly from cassandra-trunk folder.
I hope this helps.

Deploy a selenium test project in eclipse that uses ant build file to run

I have a testing project that uses selenium RC and is currently on eclipse. I run the selenium test scripts and generate report using ant build file in eclipse only.
I want to deploy my project in executable file such that i don't need eclipse to run my project. It can be .jar file or .bat file. preferably .bat file; so that i can run it from command line.
Also, in case of bat file, will the other PC executing the executable will need any additional setup?
Is there any plugin for eclipse through which it can be achieved?
Well, I was doing something like this.
You should:
have mozilla executable in your path
launch java.exe from .bat file this way:
java.exe -cp ./production/;./lib/* package.MainClass
./production should contain your compiled classes and libs should contain all jars. You may also pack your app into a jar file, this is described here: http://docs.oracle.com/javase/tutorial/deployment/jar/build.html