NoSuchMethodError while executing TestNG Test Case - automated-tests

I am trying to execute Test Cases using TestNG but i am facing NoSuchMethodError. I didn't understand the issue, as i am a beginner to this sections.
I am using Eclipse Oxygen Release 4.7.0 and TestNG 7.0.

Could you please make sure there is only one testng on your classpath.
Go to eclipse and press CTRL+SHIFT+R. Type .classpath and select the file in your project and check.

Related

Runnable Jar from a JavaFX 8 project, JavaFX compenents are missing

i created a Javafx project using JDK 8 and when i tried to export it to a runnable .jar file, i got surprised that it doesn't run using CMD, and gives the following error :
"Javafx compenents are missing"
while it works perfectly during the compiling time(using the IDE) when i accessed the .jar files, i found it has just .class files (that i made), and the needed library files that haven't been exported (i made sure to select the "extract need library files extract required libraries into generated jar" option in Eclipse), is there a reason behind of this? and a way to solve it? thanks in advance
Ps: i tried this using Eclipse and Intellij IDE
I just wanna mention once again that I'm using JDK 8 where it has JavaFX library inside of it.
Did you try this?
There are detailed instructions on how to configure your IDE to run JavaFX with newer OpenJDKs (which do not come with JFX components in it).
It also explains how to create a new JavaFX Maven project from archetype, with all the necessary plugins to easily build your application while including the minimal Java components for it (using jlink).
This will ensure that anybody using your application will have those components.

How to use spring oauth source to build project?

I am trying to understand how spring-security-oauth2, therefore trying to run sparklr2 sample with source code of spring-security-oauth project.
downloaded the source code of spring-security-oauth, add it to sparklr2 build path, remove spring-security-oauth2 from maven pom, then run the project.
failed with file not found exception, missing GlobalMethodSecurityConfiguration.class, what does it means? am I suppose too create a GlobalMethodSecurityConfiguration.java? or missing some annotation dependency?
I figure it out, do not need to build with source code, just build with maven dependency, click "attach source code", then eclipse will be about to set breakpoints and debug.
P.S. need to download source code of spring oauth using git.

TeamCity won't build with NUnit class library

I have a .NET solution set up that has the main ASP MVC project and then a class library project that has had NUnit added to it for unit tests.
When I build the solution in TeamCity the main project builds fine but then when the test project builds I get these errors
error BC30002: Type 'TestFixture' is not defined.
error BC30002: Type 'Test' is not defined.
error BC30389: 'System.Diagnostics.Assert' is not accessible in this context because it is 'Friend'.
I assume it can't find the NUnit.dll or something but the dll is in the solution packages folder. I've tried doing package restore first in case it was that but it still did the same.
Update
Ok, just to test it I added Moq to the project to see if it would pick up the references. It did and worked fine, it seems to be only problem when I try to use NUnit functions. I could disable it from building but surely the NUnit tests won't be picked up in Team City?
Thanks!
Finally fixed the issue and it was my own stupid mistake. Thanks to DevOps for suggesting going through the MSBuild logs, it helped my track down the problem.
The actual DLL wasn't getting checked in to source control because the dev machine that added the test project had a global ignore file to ignore all DLL's. So I thought it was there but it was just the .xml file and I mis read it.
Anyway it now builds and runs the tests.
Thanks for the help everyone

Netbeans 7.2.1 broken reference : dist.jar (when coding on a JavaFX file)

I'm trying to learn JavaFX with reading some tutorials however, I couldn't even implement the "helloworld" application. The NetBeans said:
Error: Could not find or load main class helloworld.NewFXMain
Java Result: 1
and then when I checked Properties-->Libraries-->Run part there is a warning which says
Broken reference : dist.jar
How can I solve this?
when you create a new project in java fx and want to run the project for demo then this error occur .
you can try it given below:-
1.right click on project.
then click on clean and build.
its running your project in netbeans.
Before running, try "clean and Build Project" option.
Menu->Run->Clean and Build Project
then run your project.
It worked for me.

Flex Mojo Maven Compile Question

I am trying to get the flex mojos maven compiler to run my projects.
Anyone with feedback on the below information is appreciated.
I am using this configuration for the maven compiler plugin and for
some reason every time I run the clean install on my SWF project I
still see the following in the compile step for the app.
info.rvin.mojo
flex-compiler-mojo
true
true
-compiler.accessible=false
-compiler.actionscript-file-encoding UTF-8
-compiler.allow-source-path-overlap=false
-compiler.as3=true
-compiler.debug=false
That means I can not connect to my app via the Flex Builder's debug
tool. Any thoughts on how I should properly configure the plugin in
the pom.xml?
Thanks!
adam, we're just starting to build out the chapter on flexmojos in Maven: The Definitive Guide. For starters, use the new plugin groupId, artifactId that is listed in that chapter. velo moved the flexmojos project over to the Sonatype Forge a few months ago, and we're just getting the 3.0 release out.
To anyone out there reading this: remember Maven is a build tool; it only (typically) executes (parts of) your code as a consequence of executing the tests you've implemented.

Resources