Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20580

Add a "Execute Database Query" test results source

      My vision of extension:

      • User can define a source database using Database Plugin extensions
      • User can create an SQL query with pre-defined resulting column requirements via textbox (easy for plain test results, but may be challenging for hierarchical reports)
      • Extension just performs query and parses its results

      If we add such functionality into the xUnit plugin, it will require additional Database plugin dependency. Is it applicable or does it require additional plugin?

          [JENKINS-20580] Add a "Execute Database Query" test results source

          Adding the ability to store test results is a good idea for the xUnit plugin.
          But we must define a schema, right?

          Is a RDMS is the best choice? What about a document-oriented NoDQL database such as MongoDB?

          What you thoughts?

          Gregory Boissinot added a comment - Adding the ability to store test results is a good idea for the xUnit plugin. But we must define a schema, right? Is a RDMS is the best choice? What about a document-oriented NoDQL database such as MongoDB? What you thoughts?

          Oleg Nenashev added a comment -

          use of package versions and their download via wget
          NoSQL databases would be a good feature, but AFAIK there are no generalized adapters in Jenkins plugins. On the other hand, SQL-databases can be integrated via “Database plugin”, which hardly depends on native java.sql.* and javax.sql.* libraries.
          I propose to add support of SQL databases only. Many No-SQL DBs have SQL wrappers (e.g. MySQL Cluster or Mongo), so it will be possible to integrate them.

          My vision of the implementation:

          • xUnit data source options:
            • Database configuration (provided by Database plugin)
            • SQL query
              • The query should support variables substitution
            • generic stuff like patterns
          • Data formats:
            • A simple plain format is preferable
            • xUnit test structure and statistics can be recalculated inside plugin
            • Column names may be hardcoded, because a user can assign them in SQL request
          • It would be great to have a global storage of requests (version X)

          Response columns:

          • TEST_PATH - “package name + testName” path with dot delimiters
          • TIMESTAMP - A start time of the test
          • HOSTNAME – A test executor
          • TIME – duration of the test
          • Test-case stuff:
            • IS_SKIPPED
            • ERROR_TYPE
            • ERROR_MESSAGE
            • FAILURE_TYPE
            • FAILURE_MESSAGE
            • SYSTEM_OUT
            • SYSTEM_ERR

          It is possible to re-construct an almost-complete JUnit 4 report from such query, so it may be a convenient approach with relatively low efforts.

          Oleg Nenashev added a comment - use of package versions and their download via wget NoSQL databases would be a good feature, but AFAIK there are no generalized adapters in Jenkins plugins. On the other hand, SQL-databases can be integrated via “Database plugin”, which hardly depends on native java.sql.* and javax.sql.* libraries. I propose to add support of SQL databases only. Many No-SQL DBs have SQL wrappers (e.g. MySQL Cluster or Mongo), so it will be possible to integrate them. My vision of the implementation: xUnit data source options: Database configuration (provided by Database plugin) SQL query The query should support variables substitution generic stuff like patterns Data formats: A simple plain format is preferable xUnit test structure and statistics can be recalculated inside plugin Column names may be hardcoded, because a user can assign them in SQL request It would be great to have a global storage of requests (version X) Response columns: TEST_PATH - “package name + testName” path with dot delimiters TIMESTAMP - A start time of the test HOSTNAME – A test executor TIME – duration of the test Test-case stuff: IS_SKIPPED ERROR_TYPE ERROR_MESSAGE FAILURE_TYPE FAILURE_MESSAGE SYSTEM_OUT SYSTEM_ERR It is possible to re-construct an almost-complete JUnit 4 report from such query, so it may be a convenient approach with relatively low efforts.

          Tim Jacomb added a comment -

          The junit plugin has implemented this in https://github.com/jenkinsci/junit-sql-storage-plugin/

          Removing database plugin as nothing is needed from that one

          Tim Jacomb added a comment - The junit plugin has implemented this in https://github.com/jenkinsci/junit-sql-storage-plugin/ Removing database plugin as nothing is needed from that one

          Nikolas Falco added a comment -

          Close because of junit-sql-storage-plugin. xUnit rely on JUnit plugin sto storage, render all report informations

          Nikolas Falco added a comment - Close because of junit-sql-storage-plugin. xUnit rely on JUnit plugin sto storage, render all report informations

            nfalco Nikolas Falco
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: