{"id":20306190,"url":"https://github.com/giis-uniovi/tdrules","last_synced_at":"2025-04-11T15:05:56.675Z","repository":{"id":177530366,"uuid":"660517431","full_name":"giis-uniovi/tdrules","owner":"giis-uniovi","description":"Test Data Coverage Evaluation components: Full Predicate Coverage Rules (FPC) and SQL Mutants to assess the coverage of the test data","archived":false,"fork":false,"pushed_at":"2025-04-05T07:17:19.000Z","size":1500,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T08:23:09.485Z","etag":null,"topics":["api-testing","coverage","database","fpc","mcdc","mutants","openapi","sql","testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giis-uniovi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T07:28:46.000Z","updated_at":"2025-04-05T07:17:22.000Z","dependencies_parsed_at":"2023-09-23T08:39:50.816Z","dependency_job_id":"96036971-f03d-4033-b979-83dcb20441b7","html_url":"https://github.com/giis-uniovi/tdrules","commit_stats":null,"previous_names":["giis-uniovi/tdrules"],"tags_count":15,"template":false,"template_full_name":"giis-uniovi/samples-giis-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giis-uniovi%2Ftdrules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giis-uniovi%2Ftdrules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giis-uniovi%2Ftdrules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giis-uniovi%2Ftdrules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giis-uniovi","download_url":"https://codeload.github.com/giis-uniovi/tdrules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429076,"owners_count":21101782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","coverage","database","fpc","mcdc","mutants","openapi","sql","testing"],"created_at":"2024-11-14T17:12:20.409Z","updated_at":"2025-04-11T15:05:56.667Z","avatar_url":"https://github.com/giis-uniovi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Status](https://github.com/giis-uniovi/tdrules/actions/workflows/test.yml/badge.svg)](https://github.com/giis-uniovi/tdrules/actions)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=my%3Atdrules\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=my%3Atdrules)\n[![Test Reports](https://img.shields.io/badge/%20-Test_Reports-orange)](https://giis-uniovi.github.io/tdrules/junit-noframes/junit-noframes.html)\n[![Test Reports (frames)](https://img.shields.io/badge/%20-Test_Reports_(frames)-orange)](https://giis-uniovi.github.io/tdrules/junit-frames/index.html)\n[![Maven Central (bom)](https://img.shields.io/maven-central/v/io.github.giis-uniovi/tdrules-bom)](https://central.sonatype.com/artifact/io.github.giis-uniovi/tdrules-bom)\n[![Nuget](https://img.shields.io/nuget/v/TdRules)](https://www.nuget.org/packages/TdRules/)\n\n# TdRules - Test Data Coverage Evaluation\n\nThis repository contains a set of components to generate *Full Predicate Coverage Rules* and *SQL Mutants*\nto assess the coverage of the test data in relation to a query and load test data:\n\n- Discover the data store schema from an OpenApi specification ([tdrules-client-oa](tdrules-client-oa/README.md))\n  or from a JDBC connection to a relational database.\n- Generate the FPC Rules and SQL Mutants ([TdRules Service](https://in2test.lsi.uniovi.es/tdrules/)).\n- Load test data ([tdrules-store-loader](tdrules-store-loader/README.md)) through a REST API or a JDBC connection.\n- Available for Java 8 and higher, and .NET.\n\nNOTE: The name *TdRules* (Test Data Rules) is replacing the former *SQLRules* \nto enable generation of rules for data stores other than relational databases.\n\n## Quick Start\n\n- On Java, include the client API dependencies\n[tdrules-client](https://central.sonatype.com/artifact/io.github.giis-uniovi/tdrules-client)\nand either \n[tdrules-client-oa](https://central.sonatype.com/artifact/io.github.giis-uniovi/tdrules-client-oa)\nor\n[tdrules-client-rdb](https://central.sonatype.com/artifact/io.github.giis-uniovi/tdrules-client-rdb)\nthat are available in Maven Central.\nA bom is also available:\n[tdrules-bom](https://central.sonatype.com/artifact/io.github.giis-uniovi/tdrules-bom).\n\n- On .NET, include the `TdRules` package\n[TdRules](https://www.nuget.org/packages/TdRules/)\navailable in NuGet.\n\n**Example:** To generate the FPC Rules for a query (`query`)\nthat executes against \nan OpenApi schema specification indicated by file or url (`spec`)\nor a relational database that can be reached by an open JDBC Connection (`conn`),\nyou first get the data store schema model and then the rules model as follows:\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cstrong\u003eJava (OpenApi)\u003c/strong\u003e\u003c/summary\u003e\n\n```Java\nTdSchema schemaModel = new OaSchemaApi(spec).getSchema();\nTdRules rulesModel = new TdRulesApi().getRules(schemaModel, query, \"\");\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cstrong\u003eJava (RDB)\u003c/strong\u003e\u003c/summary\u003e\n\n```Java\nTdSchema schemaModel = new DbSchemaApi(conn).getSchema();\nTdRules rulesModel = new TdRulesApi().getRules(schemaModel, query, \"\");\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003e.NET (RDB only)\u003c/strong\u003e\u003c/summary\u003e\n\n```C#\nTdSchema schemaModel = new DbSchemaApi(conn).GetSchema();\nTdRules rulesModel = new TdRulesApi().GetRules(schemaModel, query, \"\");\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eOther languages\u003c/strong\u003e\u003c/summary\u003e\n\nYou still can generate the API client to get the rules from other languages using the\n[Open API Generator](https://github.com/OpenAPITools/openapi-generator).\nThe API description of TdRules can be \n[found online here](https://in2test.lsi.uniovi.es/tdrules/api/v4/swagger-ui/index.html).\n\n\u003c/details\u003e\n\n## Contributing\n\nSee the general contribution policies and guidelines for *giis-uniovi* at \n[CONTRIBUTING.md](https://github.com/giis-uniovi/.github/blob/main/profile/CONTRIBUTING.md).\n\nModules/folders currently available in this repo are:\n\n- `tdrules-bom`: The bill of materials of all TdRules components.\n- `tdrules-client`: Client API to generate FPC Rules and SQL Mutants.\n- `tdrules-model`: Models of the FPC Rules, SQL Mutants and the data store schema.\n- `tdrules-client-oa`: Client API to generate the data store schema from an OpenApi specification.\n- `tdrules-client-rdb`: Client API to generate the data store schema from a live JDBC connection.\n- `tdrules-store-rdb`: Core component used to discover the schema of relational databases.\n- `tdrules-store-shared`: Shared components for all data stores.\n- `tdrules-store-loader`: Load test data through a REST API or a JDBC connection.\n- `setup`: A folder with the configuration of test database containers to use in your development environment.\n- `net`: A folder with the source of the .NET implementation.\n\n```mermaid\nflowchart TD\n    client(client) ---\u003e model(model)\n    clientoa(client-oa) ---\u003e model\n    clientrdb(client-rdb) --\u003e model\n    clientrdb --\u003e storerdb(store-rdb)\n    storerdb --\u003e storeshared(store-shared)\n    storeloader(store-loader) ---\u003e model\n    storeloader ---\u003e storeshared\n```\n\nTo set-up the test database containers in a local development environment, see the `setup` folder.\n- The Java implementation of the relational database dependent modules has been tested with PostgreSQL, SQL Server and Oracle.\n- The .NET implementation has been tested with SQLServer.\n\n## Citing this work\n\nFPC Rules and SQL Mutants:\n- Javier Tuya, Mª José Suárez-Cabal and Claudio de la Riva. Full predicate coverage for testing SQL database queries. *Software Testing, Verification and Reliability*, 20 (3) 237-288, September 2010.\n- Javier Tuya, Mª José Suárez-Cabal, Claudio de la Riva. Mutating database queries. *Information and Software Technology*, 49(4) 398-417, April 2007.\n\nUsing the rules to generate and reduce test databases:\n- J. Tuya, C. de la Riva, M.J. Suárez-Cabal, R. Blanco. Coverage-Aware Test Database Reduction. *IEEE Transactions on Software Engineering*, 42 (10) 941-959, October 2016.\n- M.J. Suárez-Cabal, C. de la Riva, J. Tuya, R. Blanco. Incremental test data generation for database queries. *Automated Software Engineering*, 24(4) 719-755, December 2017.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiis-uniovi%2Ftdrules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiis-uniovi%2Ftdrules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiis-uniovi%2Ftdrules/lists"}