{"action":"created","issue":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/153","labels_url":"https://api.github.com/repos/oasp/oasp4j/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/oasp/oasp4j/issues/153/comments","events_url":"https://api.github.com/repos/oasp/oasp4j/issues/153/events","html_url":"https://github.com/oasp/oasp4j/issues/153","id":53606182,"number":153,"title":"Concept for test data management","user":{"login":"Max-Goebel","id":10220824,"avatar_url":"https://avatars.githubusercontent.com/u/10220824?v=3","gravatar_id":"","url":"https://api.github.com/users/Max-Goebel","html_url":"https://github.com/Max-Goebel","followers_url":"https://api.github.com/users/Max-Goebel/followers","following_url":"https://api.github.com/users/Max-Goebel/following{/other_user}","gists_url":"https://api.github.com/users/Max-Goebel/gists{/gist_id}","starred_url":"https://api.github.com/users/Max-Goebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Max-Goebel/subscriptions","organizations_url":"https://api.github.com/users/Max-Goebel/orgs","repos_url":"https://api.github.com/users/Max-Goebel/repos","events_url":"https://api.github.com/users/Max-Goebel/events{/privacy}","received_events_url":"https://api.github.com/users/Max-Goebel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-07T07:43:54Z","updated_at":"2015-01-12T07:49:14Z","closed_at":null,"body":"Currently there is no standardized concept for managing test data in OASP applications. There must be answers for the following questions:\r\n**1. Should test data be shared by multiple test cases, or should each test case use its own data? Maybe there are different answers for master data and for transaction data.**\r\n**2. How is the test object reset to a defined starting state, so that test cases can be run? Possible solutions:**\r\n   a) Each test case must create its own test data (and remove it after having been run). \r\n   b) There is a monolithic data creation script for all test cases (and a corresponding data removal  script)\r\n   c) Hybrid: Data that is used by multiple test cases is created and removed by common scripts, all test case specific data is created and removed by the individual test cases\r\n**3. How do test cases / scripts create and remove data?**\r\n   a) Via the service layer? \r\n   b) Via the logic layer?\r\n   c) Via data access layer?\r\n   d) Via SQL-Statements without using any layer?\r\n   e) Via importing a database dump?\r\n**4. In which format should test data be stored?**\r\n   a) Interlinked objects, generated with dependency injection defined in spring xml?\r\n   b) Separate files (CSV, XML…)?\r\n   c) Hard coded in JUnit-Tests?\r\n**5. Is it better to use synthetic data or should productive data be use, wherever it is possible?**\r\n**6. Should there be a central data base pool for all test levels (also test levels that are not in responsibility of the developers) or should be separate test data pools per test level?**\r\n**7. How should test data be generated?**\r\n   a) No generation, only manual creation?\r\n   b) “Throw-away-generation”. Generation scripts are not kept after data is generated\r\n   c) Smart, configuratable generation tools? Which tools?\r\n**8. How do we treat test data aging (e.g. date-fields that the system validates against the current system time)? Which wildcards are needed?**\r\n**9. When do we update test data that is aged?**\r\n   a) Automated data update before tests are started\r\n   b) On-the-fly update by each test case\r\n\r\nMaybe there are no general answers to all of these questions. At least it must be possible to give advice, in which cases which solution is the best. Furthermore, tool support is needed for managing und generating test data."},"comment":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/comments/69537372","html_url":"https://github.com/oasp/oasp4j/issues/153#issuecomment-69537372","issue_url":"https://api.github.com/repos/oasp/oasp4j/issues/153","id":69537372,"user":{"login":"hohwille","id":1923119,"avatar_url":"https://avatars.githubusercontent.com/u/1923119?v=3","gravatar_id":"","url":"https://api.github.com/users/hohwille","html_url":"https://github.com/hohwille","followers_url":"https://api.github.com/users/hohwille/followers","following_url":"https://api.github.com/users/hohwille/following{/other_user}","gists_url":"https://api.github.com/users/hohwille/gists{/gist_id}","starred_url":"https://api.github.com/users/hohwille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hohwille/subscriptions","organizations_url":"https://api.github.com/users/hohwille/orgs","repos_url":"https://api.github.com/users/hohwille/repos","events_url":"https://api.github.com/users/hohwille/events{/privacy}","received_events_url":"https://api.github.com/users/hohwille/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T07:49:14Z","updated_at":"2015-01-12T07:49:14Z","body":"> All entities that are created by the test cases must have an ID < 1000000. Before tests start, all IDs lower than 10000000 must be deleted.\r\n\r\nVice-versa: Entities created by the software will use the hibernate sequence that is initialized with 1000000. All master-data and test-data has to use IDs lower than that. At the beginning of an integration test, all entities with an ID >= 1000000 can/shall be deleted to eliminate (potential) side effects of previous test-cases."}}