Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6111303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:36:55+00:00 2026-05-23T14:36:55+00:00

Whenever I run Automated Tests on my site, all the tables get cleaned to

  • 0

Whenever I run Automated Tests on my site, all the tables get cleaned to 0 rows. Is that by design? How do I prevent them?

Update: Found the real ‘culprit’
%test.jpa.ddl=create

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:36:55+00:00Added an answer on May 23, 2026 at 2:36 pm

    That is by design. Unit tests should not have any external dependencies on some pre-existing state such as persisted data. If you need data for testing purposes, you need to set that up in your @Before setup method. For example:

    @Before
    public void setUp() {
        // The following loads test data from the YAML file
        Fixtures.loadModels("test-data/users.yml");
    }
    
    @Test
    public void someTest() {
        assertEquals(5, User.count()); // 5 User records exist due to @Before method
    }
    

    You should take a look at your conf/application.conf file and notice that you have a line that reads:

    %test.db=mem
    

    This is the default setting – which says that when the application is run in test mode, use an in-memory database. If you want your tests to work on persisted data (not recommended), you can change the test mode db settings. See Play test documentation for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I run rake spec, there's a 70-80% chance that I get a SEGMENTATION_FAULT
I would like that whenever I run git diff or git show it silently
Whenever i try to run sqlmetal, i get this: 'sqlmetal' is not recognized as
I am trying to get my Chrome Extension to run the function init() whenever
Whenever I run my program with fclose(outputFile); at the very end, I get an
Whenever I run this, and open the color dialog, there are many colors that
I want to get the ISP provider name and display it whenever I run
Whenever I run this code, I get a same result. Program #include<stdlib.h> int main(int
Whenever I run bundle install (or bundle update ) on my Rails project I
Whenever I run propel-gen on a clean database (no tables defined), it generates errors

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.