Store the results in the database following the execution of a protractor test

I am completely new to angular protractor testing. I have created some test cases using the protractor framework with jasmine runner BDD style. Within a single test class, I have 10 to 12 specs, each with an expectation. Currently, I am running these tests on a selenium server directly. However, I am now considering saving these test cases in a database. My plan is to create a table for tests, with columns such as Test number, Test name, specs, and pass or fail status.

Below is an example of my code:

This class contains 10 specs

describe('03 check all user report settings', function () {

// Specs go here...

})

The output from the test report is as follows:

Report summary goes here...

My Configuration file looks like this:

Config details here...

Now, my question is how can I best store this report in a database using a table structure? Any suggestions would be greatly appreciated.

Answer №1

Storing test results or the tests themselves in a database is not a good idea.

There are various solutions available for managing test results.

For Protractor and Jasmine, consider using Allure2 or Allure 2 - jasmine for custom implementations.

Report-portal is another option but may require custom plugin development for Jasmine as the current support for JavaScript/TypeScript is limited.

This approach allows you to have files representing test results that can be easily stored, moved, and used for metrics analysis.

Additional reporting tool options include:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Oops! Looks like there's an issue with the CustomersController. It seems it's not a function and is showing as undefined. You can visit http://errors.angularjs.org/1.2.12/ng/areq for more information

I have a project in angular js for practice, Description demoangular.html page Logout.html page The demoangular page is a login page that redirects to logout.html However, logout.html isn't behaving properly It shows the following error on the c ...

Exploring the capabilities of chromaprint.js within a web browser

I'm currently in the process of developing a music streaming platform and I'm looking to include the chromaprint.js library for deduplication purposes. In my workflow, I utilize browserify and gulp. Despite the fact that the library claims it ca ...

Cypress - simulate multiple responses for watchPosition stub

I have a small VueJs app where clicking on a button triggers the watchPosition function from the Geolocation API to retrieve the user's position and perform some calculations with it. Now, I want to test this functionality using Cypress testing. To ...

Incorrect Tooltip DisplayWhat could be causing the issue with

I am facing an issue when trying to add a tooltip to a glyphicon within a tile. It doesn't seem to work correctly when it should. However, placing the tooltip outside of the tile works fine. I'm quite perplexed and would greatly appreciate any as ...

Show JSON response using AJAX jQuery

After receiving the JSON Response, { "user_data": { "id": 22, "first_name": xxx, "last_name": xxx, "phone_number": "123456789", }, "question_with_answers" : [ { "id": 1, ...

Float over a specific line in a drawing

I am looking to develop a unique rating system using css, html, and potentially js : My goal is for the user to hover over a specific section of a circular stroke and have it fill with a particular color, all while maintaining functionality. So far, I hav ...

Opt for a line break over a semicolon when using jQuery

I need assistance with breaking the line wherever a semicolon is present. var locdata = { "locations": [{ "id": 0, "name": 'USA', "cx": 100, "cy": 100, "address":'545, 8t ...

Having trouble parsing the body parameter in Express for a POST request

I am encountering difficulty in accessing the body parameters of a request using Express: const bodyParser = require('body-parser'); const cors = require('cors'); const express = require('express'); const app = express(); con ...

What do I need to add in order to connect a controller to a form submission?

Let's set the scene: There are multiple newsletter forms scattered across a webpage, all needing to perform the same action. This action involves making an AJAX request with certain data and displaying a message using an alert once the request is comp ...

Modify the database entry only if the user manually changes it, or temporarily pause specific subscriptions if the value is altered programmatically

After a change in the viewmodel, I want to immediately update the value on the server. class OrderLine { itemCode: KnockoutObservable<string>; itemName: KnockoutObservable<string>; constructor(code: string, name: string) { ...

Transforming a reply into a tabular format

I am trying to store my program details in an array called newprogramdetails[] and display them in a table. However, I keep getting an undefined message because programdetails is also an array. How can I fix this issue? My HTML code looks like this: HTML: ...

What is the best tool to develop my AngularJs class library (service/factory/provider)?

I am currently working on my main service: (function (angular) { "use strict"; angular .module("app") .service("mainService", mainService); mainService.$inject = ["classLibrary"]; function mainService(classLibrary) { this.person = new clas ...

What could be causing a blank page to appear after being redirected? (Using NextJS 13 API Route)

After struggling with this issue for 2 days, I'm throwing in the towel and reaching out to the community for assistance. I've been tasked with setting up a basic login system for a new project using NextJS v13. However, it seems like a lot has c ...

What are some strategies for preventing a child component from triggering a re-render of its parent component in React Native?

My child component is causing the parent component to re-render when it's clicked, which is not the desired behavior. I initially thought that removing all the setState() functions in the child component would prevent this, but then I realized that As ...

Can jQuery.jScrollPane be set to consistently display a vertical scroll bar?

Can jQuery.jScrollPane be configured to consistently display a vertical scroll bar? Is there a hidden setting or API function that can achieve this? Ideally, without needing to adjust the content pane's height or other properties. ...

Exploring the Usage of sessionStorage within the <template> Tag in Vue.js

Is it possible to access sessionStorage in the script section of a Vuejs component like this? <template> {sessionStorage} </template> Whenever I try to call it this way, I consistently receive the error message "cannot read property &apo ...

Issue occurred when attempting to send the STMT_PREPARE packet, with the Process ID being

I can't seem to figure out why this bug keeps happening. Here is the script I am using: foreach($brands as $brand){ // about 600items for this loop .... .... DB::table('mailing_list')->insert(array( &ap ...

What distinguishes between the methods of detecting falsy and truthy values?

While working with JavaScript / Typescript, I often find myself needing to verify if a length exists or if a value is true or false. So, the main query arises: are there any differences in performance or behavior when checking like this... const data = [ ...

Using Javascript to Pass Variables to Ajax with getElementById

Struggling to figure out how to effectively pass a Javascript Variable to Ajax and then post it to PHP? While both the Javascript and PHP code are functioning as expected, the challenge lies in transferring the Javascript Variable to Ajax for subsequent ...

Angular JS returned a 405 Error code in response to the preflight request

I'm currently making an API call across domains and encountering a specific response in Chrome. Even though I have all the necessary headers included in my REST API on the other domain, I am still facing this issue. <add name="Access-Control-All ...