Questions tagged as 'junit'

1
answer

No tests found with test runner 'JUnit 4'

When you create a new package and create a new test in this package, try to run the test eclipse returns the message: "No tests found with test runner 'JUnit 4'" Within the project I have another package with other tests that run normally. Do...
asked by 30.08.2016 / 14:50
1
answer

How to configure a project with JUnit to be able to construct correctly inject the EntityManager?

I have a legacy JSF / Demoiselle 2.4 application that did not have the good practice of building unit tests. In order to satisfy new requirements, I have implementations to make and I intend to build them using TDD. However, when writing my f...
asked by 04.05.2015 / 14:21
1
answer

How to solve the error Caused by: java.lang.NullPointerException in getSessionFactory ()

This error message is appearing to me Herearethelinesthatgaveerror:publicclassHibernateUtil{privatestaticfinalSessionFactorysessionFactory=buildSessionFactory();privatestaticSessionFactorybuildSessionFactory(){try{Configurationconfiguration=n...
asked by 14.04.2015 / 17:30
1
answer

Problem with @Autowire Spring + Hibernate and Junit

Good night, I'm trying to create a project using Hibernate and Spring, I was successful creating some configurations, I even managed to generate the database by initializing the application using Spring, however I'm "stuck" in creating my DAO's,...
asked by 29.12.2014 / 18:37
1
answer

Junit with spring Autowired

I have a big problem that in my GenericService I use an @Autowired in an HttpServletRequest (Even though I do not know the utility, therefore, I do not know the architecture so well), and I needed to use unit test for test battery in my services...
asked by 26.08.2014 / 14:02
0
answers

Plugin to create variable instance constructor at runtime

I need to create some tests using variables already instantiated at runtime, and instead of manually mounting, object by object, attribute by attribute, I would like some tool that automates itself and already brings code with objects and variab...
asked by 24.08.2018 / 16:11
0
answers

Selenium does not find element

Follow the code. Selenium does not find the element: package test; import java.util.concurrent.TimeUnit; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.seleni...
asked by 11.05.2018 / 15:11
1
answer

Gson Library Changing util.Date

When using the GSON library for JSON manipulation, I noticed that when parsers are done the date is being changed, it's tiny, but it's enough to break my unit test with JUnit . > Follow a sketch code to show the strange beh...
asked by 17.10.2017 / 22:12
0
answers

Driver does not wait for the page to load to proceed

Hello, I'm using Selenium to do some testing and then exporting the code to eclipse. I'm trying to get a getText on a page that uses ajax using xpath, and then I'm trying to authenticate with assertTrue, but I'm not getting the page to fully loa...
asked by 25.01.2017 / 19:01
1
answer

Selenium run task to the end

In tests with Selenium, running through Eclipse, when I run several at the same time. The errors happen: First, do not finish running the task open another browser. Begins to run the second test without even finishing the first Problem a...
asked by 25.10.2016 / 18:42