Newest testcase Questions

Q&A for professional and enthusiast programmers

Add scala test-case to jar file in maven project

I want to include scala test case to the jar file. I have maven project. I have used following : <assembly> <id></id> <formats> <format></format> </formats&...

Dynamically populate a database from Postgres backup in Django TestCase setUp()

I'm looking for a Pythonic way to get a robust test database set up. What I'd like to do: take a previous database backup and load it into the database that Django's TestCase creates during setUp(). (...

Test case for destructuring in clojure for database connectivity

I started working on clojure a week back and i am not able to write a test case for the below code for destructuring of maps using default values: (defn connect-db [{:keys [host port db-name username ...

0 and 1 - Switch Coverage in State Transition Testing?

This question is not programming related but related to one of test case design the technique. State Transition Diagram technique provides Test coverage by identifying test conditions via N-1 switch ...

Why could this code possibly be failing a test case?

I began a fairly simple Google foobar exercise and have 24 hours left to finish it. So I literally just started coding python while learning it and I got 4/5 of their test cases to pass. I've been ...

What's wrong when running process under testcase and quartz job

all.I have a problem . It is ok that i run the code on main method. new Thread(()-> { try { IOUtil.executeSystemCommand("ipconfig", new ProcessCallback() { @...

I can't able to integrate the testlink (Test Management Tool) with JIRA using REST Interface

I am not able to integrate the TestLink with JIRA using REST Interface, While connecting, It displays the error message as "Connection is KO, Check configuration". PFAenter image description here

Java: 401 Unauthorized test case issue in Unit test case for spring boot, REST

everyone. I have written a test case: AppManagementApplicationTests.java @Test public void testWithAppNameAsNull() { Input input = new Input(); // input type String inputTrue = input....

JUnit 4 Test Case [closed]

I need help on creating JUnit 4 Test Case for this code. public static int computeValue(int x, int y, int z) { int value = 0; if (x == y) value = x + 1; else if ((x > y) &&...

TFS C# Update Steps in TestCases

Im trying to update the field steps as with other fields testCase.Fields["field"].Value = "value"; but is still empty after the change. How can I modify the steps in a Test Case?

TFS - linking Run ID to Test ID?

TFS web: I assigned all testers to test a specific suite / test cases. I'm looking for a possibility to create a statistic / query to associate the run IDs to their test case ID. Would this be ...

use output test case with other test case in input value, RIDE/robot framework

I have a probelm to use an output from a test case to use it with another test tase like input value ! did you have an idea how to do that ?

Django Test mocked ImageField prevent upload or clean after tests

I am working on a TestCase for my project, involving some Image and FileFields. Some objects are loaded with fixtures, some objects are created during the tests. I Mocked my image with a ...

Test Scenario for automation test developers

"Suppose there was a transaction that had been done in Company , the transaction id should be available on the screen alongside with the address of shipment, date of order, seller’s name, and delivery ...

What will be the RSpec test case for devise invitation controllers edit and update method

I am not able to go in my invitation controller edit method, I have tried everything but not able to go in edit method. Here is my edit method test case: describe "GET :edit invitation" do it '...

How do I get the map pattern to correctly return a list of squares from a function?

I'm supposed to use the map pattern to make a result list that squares the numbers in the input list. def square_all(list1): list1 = [] squared = map(lambda x: x**2, list1) return ...

Cannot find context in class which extends TestCase

I am writing test cases for android app classes. But I am unable to find a way to get context of this class. Below is my test case class. public class SplashScreenActivityTest extends TestCase { ...

How to make sure that test cases have covered all functions? Is there any tool/software can be used to review test cases?

I have a question: "How to make sure if test cases covered all functions? Is there any tool/software used to review test cases?" This is the methods that I'm using: Read all related documents/...

Where to import libraries in unit tests ? Python

I have to write a test file like this: import unittest from mylibrary import some_crazy_func class TestSomething(unittest.TestCase): def test_some_crazy_func_that_needs_io_open(self): # ...

What is the test case format in gherkin language?

I have a mock up profile page of a gym and I'm to write test cases for editing that profile page in gherkin language. I don't the gherkin test case format. Can anyone please help me with this?

Rounding float numbers within a dictionary

I am trying out a challenge at codewars.com, but I cannot figure out why my code cannot pass the test cases.I am supposed to round of any float numbers to 2 decimal points within a dictionary. I have ...

In what test cases could this fail to give the right output and what are potential solutions?

I need to take a list of integers and multiply its elements such that I get the greatest number possible. This number, I need to output as a string. Example: (int list) givenList = [2, 0, 2, 2, 0] ...

test case not covering in cobertura

public class MyUtil { public static Properties loadProperties() throws Exception { Properties prop = new Properties(); InputStream inputStream = MyUtil.class.getClassLoader()....

Sonar cube properties for source code from different repository

I have 3 repositories A, B and C. Repository A and B contains source code and they are interrelated and they together forms an application. C contains the test cases for A&B. The unit testcases ...

testcase not working properly. Issue setting two numbers equal to each other

I'm working on a test case and I'm having trouble. I'm having a hard time with getting my test cases to work. Here is the code: public class Appointment extends Actor { int hour; ...

Groovy Spock Test case - inner method invocation

ApplicationController.groovy: public class ApplicationController { @Autowired ApplicationService applicationService public void executeMethodA(Map requestBody, HttpServletRequest ...

How to write the test case in Jasmine in Angular2 for redirect URL?

SecurityService.prototype.Feedback = function () { window.open('https://www.google.com/', '_blank'); I need to write the test case for above code in Jasmine in Angular 2.

Is there a way to reduce the size of a preprocessed source of a compiler bug test case using Clang?

I ran into an issue with the Intel compiler and wondered if there was a way to automatically reduce the size of the preprocessed source. It seems a lot of standard headers (of which quite some ...

How to write testcase for [object NodeList] in jasmine testing?

When I try write this testcase. let abc = document.querySelectorAll("span"); expect(abc).toBe(true); I'm getting Expected [object NodeList] to be true.

Increase Code Coverage on Salesforce Standard Developer Test Case

I need to increase code coverage on my test case. Right now, I am around 50%. I know that my extension is Account, but I somehow need to include Task info and Account.ParentId != Null and Task....

Codeigniter PHPUnit Exception Testcase

How to write testcase for PHPUnit query Exception. Activerecord in codeigniter is not throwing exception. Codeigniter PHPUnit Codecoverage for query Exception

How can I know that TestNG framework is suitable to perform test case prioritization in regression testing?

I have a requirement to know that, whether TestNG framework is suitable for test case prioritization in regression testing to increase the fault rate detection or not? Which also enhance the ...

Can you “skip” a code block in phpunit?

I was assigned on an old project and currently doing the test cases. I have an error on a certain code block that saves the data to excel. However, the method outputs a header, and thus the phpunit ...

Results are not reflected for a test case when it is linked to a new testsuite in mtm

I have TestCase tc under TestSuite A. Now I have linked the tc to a new testsuite B. TestCase tc under 'A' was run many a times and has good amount test results hirstory. But when I view the same ...

Laravel 5.4 No visit, no action TestCase UnitTest

I am trying to get just a basic unitest working according to the Laravel Specification here: https://laravel.com/docs/5.0/testing#calling-routes-from-tests I don't seem to have $this->action, I don't ...

TFS web - Test case invitation via email contains wrong link

I have a TFS 2015 with a couple of projects/teams created. We are doing manual tests and I want to send invitations of these manuel tests/suites to the testers. Exemples: - project a / team 1 - ...

How to solve Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration()?

When I run phpunit on the command promp, there exist error like this : Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\...

unit testing using jsUnit in AngularJS application

I am new to unit testing and that too with jsUnit in AngularJS application I am finding to much difficulty. After searching a lot for the same this is the last hope. How I do write unit test case ...

Java Rally REST API: How to create new test case

I have been able to successfully create test RESULTS through the Rally APIs, but now I would like to create a test case if one is not already present in Rally. I am receiving an error from Rally that ...

Racket test-suite print test-case failure messages

I have the following example of test code: ;; UNIT TESTS (define (check-equal?-with-output a b failure-msg) (display "checking for equality:") (newline) (display a) (newline) (display b) (...

React-native test cases fail

I'm trying to write some test cases of a simple react-native app, but my test case always fails with an error which apparently cannot find UIManager.createView Component class LiveTab extends ...

How to test whether any exception was rescued?

Is there a way to find out whether any exception was raised and rescued during the execution of some code? Preferably in tests written with ActiveSupport::TestCase and not RSpec Is there any global ...

How to distribute test cases assignments between testers?

This is real interview question: When a new feature comes out, How to distribute assignments about writing test cases between testers? Could anyone help?

How do I clone or copy an existing test case in a suite in VSTS?

Reading up on test different configuration article from Visual Studio. In the example, they were able to create multiple of the same test cases (same ID) and assign different configurations to them. ...

Android UiAutomator test case jar file is not working

I have been trying to write some instrumental test case of android code using UiAutomator tool. This test cases can be run via android studio without any problem. But now i want to install this test ...

use an output test case (xml) in another test case like input value, RIDE/robot framework

I have a problem to automate my test cases, so my problem is that I need to use an output test case value in the next test case like an input... I can't found the solution, did anyone have an idea??

InterNations http-mock suddenly stopped working

I am using Symfony and have a test class that extends from \Symfony\Bundle\FrameworkBundle\Test\WebTestCase I am also using the InterNations\Component\HttpMock\PHPUnit\HttpMockTrait and i called ...

First automated authentication test using Selenium Webdriver in Eclipse

I'm running a my first automated test using selenium webdriver in eclipse on a demo static site. The main purpose of the test is to show that a transaction is confirmed in my log file, e.g. should ...

how to write Test Cases for Playframework for data taking from DB(H2) by using key value(Map)

public static Map<String,Double> getSettings(){ Map<String,Double> setData= new TreeMap<>(); Logger.info("Befor List*********"); List<SystemSetting> setDataList=...

How to fix the code to test the case by JUnit and POI?

Why I can't have succeed to test this case? @Test public void test_Should_be_0() throws Exception { HSSFCell cell = new HSSFWorkbook().createSheet().createRow(0).createCell(0); cell....
Translating... 0%