Questions tagged [software-quality]
Software quality reflects how well a software conforms to given requirements (functional and non-functional), how much it shows characteristics like reliability, efficiency, security, maintainability.
213
questions
0
votes
1
answer
26
views
How to perform automated test in webview
I have Android native app and I want to test login page witch was developed using webview that’s open central Authenticator. I’m trying to use appium to test but I’ve see that appium cannot test ...
0
votes
0
answers
11
views
Quality attributes and metric in training DDPG model in Matlab
I want to ask if there are any quality attributes or metrics to look into during the training of the DDPG model in a reinforcement learning toolbox in MATLAB.
I tried to check for the performance ...
1
vote
1
answer
52
views
Find duplicate blocks of code in a Python file [closed]
is there a way to get warnings for duplicate blocks/lines of code in the same file for Python using pylint or flake8?
I am aware that for pylint R0801 warns of duplicate code in different files, but I'...
0
votes
1
answer
25
views
How do you send push notifications with Android if the user is logged out of the app? [closed]
This isn't too technical of a question.
I'm currently writing an article for push notifications on Android devices. I don't need code, per se, but if a user is logged out of an application (via the ...
0
votes
1
answer
90
views
Gitlab code quality E0401: unable to import
I am using gitlab code quality with Code-Quality.gitlab-ci.yml in my configuration (it relies on Code Climate), and I have import errors on the code quality report as shown below:
I also have the ...
0
votes
0
answers
15
views
measuring readability and reausability
When we want to use performance, we have some tools for that reason. For example: jMeter.
But how we can measure code snippet after refactoring, or using some design patterns. How we can measure ...
0
votes
0
answers
6
views
File Uploaded Successfully Bug
I am a Quality Analyst in a Proofreading service. I got an error always that File Uploaded successfully in red color but no file is uploaded.This happening from so many days. And the bug comes ...
0
votes
0
answers
51
views
Why do libraries prefer to obfuscate the code or provide no debug information instead of creating a special version containing debug information?
In libraries, we often see specific code for debug.
It can sometimes really mess up the code.
I don't see libraries that use 2 versions of the code.
1 version without debug information and 1 other ...
0
votes
0
answers
38
views
what are the difference between test cases and test scenarios in manual testing [duplicate]
What are the difference between test cases and test scenarios in manual testing? and also as a fresher I have to know about how to write test cases and test scenarios
4
votes
1
answer
212
views
In C++, can the sum of two squared float be negative?
I have a snippet of code that compute the sum of two squared floats:
float a, b, c;
// assign some random float to b and c
a = b*b+c*c;
Can a, the sum of the two squared floats, be negative?
The ...
2
votes
4
answers
260
views
Reason for using custom true false values in frameworks
I was reading the GLFW library and I noticed they use GLFW_TRUE(1) and GLFW_FALSE(0). Now I've already seen that in other frameworks as well,making their own custom true/false identifiers. Is there ...
1
vote
1
answer
103
views
CodeClimate Not reading configuration
In my react project the code quality checker CodeClimate, using advanced configuration just stop some silly code quality factors/thresholds like 50 line of code, :
Function `AutocompleteCombobox` has ...
0
votes
1
answer
32
views
JS - When to declare optional arguments?
Imagine this method:
export default function useListenDeletedChatMessages(
chatRoomId = undefined,
{
onNext = undefined,
onError = undefined,
} = {}
) {
const { modifyMessage } = ...
6
votes
1
answer
126
views
How to avoid changing many parts of code when adding new enum value, thus providing easier extensibility?
I am trying to make my code easier to extend in terms that a little change will not affect much other code.
I have an enum MyEnum, which values might increase in future.
Then, there are classes that ...
0
votes
0
answers
32
views
Better Way to Deal with Data from Database and Lists
I have TextField and onChange function it filters ListView, so is it better get whole item from table and save them in list then when change text filter that list or open stream get data from table ...
0
votes
3
answers
170
views
Can all code optimization by Lisp compile-time evaluation be achieved by an ideal compiler in other languages (such as C++)?
In Lisp you can optimize code by evaluating conditionals during compile time in a Macro. As in, you have a macro (compute-for-N 1) evaluate to code-1 and (compute-for-N 2) evaluate to code-2.
If you ...
1
vote
0
answers
32
views
Should I declare a number as constant if it is passed as a parameter to a meaningful named function?
Suppose we a validation code similar to the following:
Rule(account => account.CompanyName).MaxLength(50)
Or
Rule(account => account.Balance).MustBeGreaterThan(0)
Do we still call the numbers ...
0
votes
1
answer
154
views
Checkstyle checkstyle-checker.xml gets overriden when multiple configs are used
I need to separate the checkstyle plugin configs for production and test source code.
I managed to do it (see the config bellow), but there is 'checkstyle-checker.xml' file which is always overriden ...
1
vote
1
answer
303
views
PMD maven plugin: How to specify a different ruleset for tests?
I need to configure the PMD maven plugin to scan test source code with less strict checks comparing to production code.
Is there a way to do it?
2
votes
1
answer
392
views
How to supress checkstyle HideUtilityClassConstructor rule for classes with main method?
I want to suppress 'HideUtilityClassConstructor' rule the for classes that have main method.
That look like this:
import org.springframework.boot.SpringApplication;
import org.springframework.boot....
-1
votes
1
answer
52
views
Find inputs to a function which break the postcondition on the output
I have a function in a programming language, e.g. C. I require the output of the function to meet a certain condition. If there is some input to this function for which the output does not meet the ...
-2
votes
1
answer
76
views
Can you prevent the usage of #pragma warning disable? [closed]
Recently, our team has tried to become more strict about enforcing certain code style and quality guidelines. I'm trying to automate this as much as possible, using .editorconfig files to enforce ...
0
votes
1
answer
293
views
Failed to connect XCAutomation in Appium
I try to connect my iPhone to Appiunm it connected but once I try to run the device or run the installed application the error message got as "Failed to connect XCAutomation" My iOS version ...
1
vote
2
answers
169
views
How to fix stream error: may fail to close stream error
I am writing a method but see this error: may fail to close stream.
According to some solutions on different posts, I have added try and catch within the finally block. I also added IOUtils....
-1
votes
2
answers
547
views
How does MISRA C++ Code Compliance ensure Functional safety and Quality? [closed]
Could Anyone explain to me how MISRA C++(2008) is in incompliance with functional safety(ISO 26262), If it is really in compliance with which rules contribute to functional safety?
Is there a document ...
1
vote
1
answer
1k
views
When should I use mapstruct or converters with java 8 to avoid error-prone?
At work, we use MapStruct in many SpringBoot projects with Java 8 REST Full applications and when we need to map Entity to DTO or DTO to Response or in similar cases. But today my friend showed me a ...
8
votes
0
answers
889
views
Who first created the WET Principle?
Context
On my searches, online I found that the WET principle: "Write Everything Twice" seems to be inseparable from the DRY principle: "Don't Repeat Yourself".
However, while the ...
2
votes
2
answers
104
views
How to avoid of huge if condition using BigDecimals?
I've working on bank institution and I need to perform transactions like deposit, withdraw, transfer etc. And when we are considering fields with big values, I saw that it is common use BigDecimal ...
0
votes
0
answers
53
views
Which compilers provide guarantees (warranties) on generated asm code?
Please note that the question is about compilers in general, not targeting any particular programming language.
Context: As we know, compilers like gcc and Clang (LLVM) do not provide any guarantees (...
0
votes
2
answers
38
views
Why If statement is not working with for loop in selenium
I have a menu in the application when you click on any menu item it gives you a list which looks like this:
<ul class="list-unstyled components">
<ul class="list - unstyled ...
0
votes
1
answer
57
views
Conflict between code quality check and implicit next() in Express error handling
I am starting with NodeJS. In error handling, the following code declares the next callback and does not use it:
app.get('/user/:id', async function (req, res, next) {
var user = await getUserById(...
0
votes
0
answers
35
views
Sonarqube didn't detect common bugs in PHP
I just tried scanning one of my Laravel based project using sonarqube cloud. But it didn't detect missing semicolans as an issue? Here is the code I tried.
<?php
namespace App\Http\Controllers;
...
0
votes
1
answer
46
views
Which is better approach? one request or two requests
I have a table that returns JSON like this:
{
"status": 200,
"body": [
{
"category": "Sports",
"items": [
{
...
0
votes
0
answers
347
views
How to find the average percentage of faults detected (APFD) for test cases in open source projects?
I'm practicing test case prioritization techniques. To get real results, I need some metrics for test cases such as the average percentage of faults detected (APFD), APFD per cost, and so on. To to ...
2
votes
0
answers
3k
views
SonarQube scan runs but doesn’t generate any results
I’m running a SonarQube scan for the first time. It’s the CE version, 8.3.1.
I have SQ running on a server at 192.168.56.111. My development workstation is on 192.168.0.11. There are no network ...
1
vote
2
answers
3k
views
Best Design Pattern to execute a Series of Steps
I have an application with which a user can initiate (fill out a form and click Run) a series of steps.
First step 1 must be executed and afterwards step 2. If step 2 was successful, execute step 3 ...
0
votes
0
answers
86
views
Directly return value vs Return variable with the expected value
I found many answers about using a unique return for each function, but my question is quite tricky for me.
I really need to know if there is some reason to return a variable with the expected result ...
0
votes
2
answers
56
views
Refactoring a big function into functions within the function?
I have two functions that are not so big, and not so complex (maybe because I wrote them they don't seem so at the moment) and I have tried refactoring them (successfully), however, would that be ...
0
votes
0
answers
12
views
Is it a standard practice to have a single application/controller writing to database
I've been interviewed by some experienced engineer, when he strongly disagreed with some statements I said:
Assuming full control over your applications, It's a standard practice to make writes-to-...
10
votes
2
answers
11k
views
How to use the three steps of Jenkins Warnings Next Generation Plugin properly?
The Jenkins Warnings Next Generation Plugin's documentation for pipelines specifies three step variants:
publishIssues: Publish issues created by a static analysis scan
recordIssues: Record compiler ...
0
votes
0
answers
29
views
I am trying to learn statement coverage analysis
I am trying to learn code coverage analysis; I am bit confused because the following code has loops.
Example if the code like this
read a;
read b;
i=0
if a>b
while(to i<a)
print(i)
i++;
end ...
12
votes
2
answers
3k
views
Is using Redux Hooks instead of connect() good design?
Currently there are two concepts how to connect a React component to the redux store: connect() and Redux Hooks. I was wondering whether using hooks is considered good software design.
It harms the ...
0
votes
2
answers
118
views
How to get the length of a identifier/method in C#?
I'm trying to get the length of all the identifiers and methods of a project made in ASP.NET Core 2.2, in order to analize the code metrics for a homework, but I haven't found any kind of tool that ...
2
votes
1
answer
113
views
Law of Demeter can easily be bypassed?
Is it always possible to work around the Law of Demeter simply by creating more methods?
Some people mention that this is not valid (http://wiki.c2.com/?LawOfDemeterIsHardToUnderstand), but it seems ...
0
votes
0
answers
42
views
Is there an alternative way to enforce model validation?
In order to 1. clarify possibilities on an interface and hence 2. reduce test cases plus 3. fail as fast as possible I intend to enforce validation of a model upon creation. The model shall not be ...
2
votes
1
answer
2k
views
Automation Testing - Selenium WebDriver - Running Multiple Test Cases
I have got some problems with my automation testing.
I have nearly around 50 test cases in my Eclipse IDE. All test cases are in different classes. Also, I have got one BaseClass that contains @...
0
votes
1
answer
53
views
How to find out the quality of machine translation systems?
I know that there are various metrics for measuring the quality of machine translation systems, for example:
Bleu
METEOR
Lepor
Are there somewhere in the public domain metric results for popular ...
1
vote
1
answer
1k
views
How to solve flutter video player bad quality
I'm developing this media player app with flutter, I've followed the instructions on the flutter video player plugin documentation on the flutter official Dev site.
I noticed that whatever video that ...
0
votes
2
answers
48
views
How to unittest specific implementation
I am reading a lot about (unit)testing and I try to implement as much as possible in my day-to-day workflow, but somehow I have the feeling I am doing something wrong.
Let's say I have a function ...
3
votes
1
answer
465
views
Enforce pylint score to merge on a github branch
I would like to setup a quality check that enforces a certain score from pylint before authorizing a merge on a certain github branch. Is there a way to do this ? I see on github that you can set up "...