Newest testcase Questions

Q&A for professional and enthusiast programmers

SOAPUI JDBC MS SQL query is not working (TestSuite)

I'm using SOAPUI to test a webservice I developped. I'm actually trying to configure a TestSuite with a JDBC call to a MS SQL database. I succeeded in adding the jdbc jar files for MSSQL. The ...

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 to do bulk update of fields for test suite in test link?

There is a test suite already created with test summary and test steps in test link. I have to update few fields in each test case. How can i update in bulk instead of doing it one by one by clicking ...

Test Case failures with a java.lang.ArrayIndexOutOfBoundsException: 28526 with JDK 8 and terracotta 3.4.0

I currently moved maven java code from jdk7 to jdk8 which uses terracotta and was working properly but after changing it to jdk8 , my test cases are getting failed. I am getting following error and I ...

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() { @...

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 ...

Clustering test case by edit distance

threshold = 20 pattern = 'ccmock:' with open ('prepare.json') as f: prepare = json.load(f) ccil = reduce(lambda x, y: x is not None and x + y or y , map(lambda x: x.split(pattern), prepare)) ...

unit test for ensuring a method inside a method is not called

I have two methods like below. public bool IsSuccess() { // Some logi } public bool ShouldSendLogic() { var status = IsSuccess(); if(status) { SendInvoice(); // do some operation } ...

Find element with certain text using Selenium with Python

Currently, I am using this and it works. self.browser.find_element_by_xpath('//a/h4[text()="item I want"]').click() Is there a better way to select by text? I feel like code readability suffers ...

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....

What is the “testCasePathName” in TestLink?

I am trying to import test case results in TestLink. To do that, I have to use the method : api.getTestCaseIDByName(testCaseName, testSuiteName, projectName, testCasePathName) from the TestLinkAPI ...

BInd Jira test case and automation tests

Now on my project we use TFS as TestCase management tool, issue tracking system and code management. But we want to move to JIRA and Bitbucket. In VisualStudio we have ability to bind TC to automation ...

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): # ...

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 ...

How to stub a method in ActiveSupport::TestCase

In RSpec I could stub method like this: allow(company).to receive(:foo){300} How can I stub a method with ActiveSupport::TestCase? I have a test like this. class CompanyTest < ActiveSupport::...

Execute load test on TestSuite in SoapUI

I am using soapUI 4.6.4 version and had some test cases written which i clubbed into a TestSuite. Now i wanted to run loadtest on TestSuite itself i.e all the test cases under Testsuite should be ...

Groovy Spock Test case - inner method invocation

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

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?

How to write test code for Web API in Visual Studio?

I'm a bit new to test project. I currently have a web api project which contains Get, Put, Post and Delete methods. When comes to writing test cases, I'm confused. Should I write test code to test the ...

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 ...

How to write a Mockito testcase for Spark DataFrame

I have the following method : def subsetConversion(fPath: DataFrame): Tuple2[DataFrame, DataFrame] = { /* line 87*/ var convertedPaths = fPath.filter(fPath("Conversion") === 1) var ...

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; ...

test cases for the following flow diagram which cover the functionality completely

I want to make a test-case with attached file in javascript. I am new in javascript. can anyone help to make a test case of this attaenter image description hereched file..

Unable to cover or conditioned line in test case

I am one function where I am returning values like this... GetData(){ let parsedData= JSON.parse(data.data.json); return { x: parsedData.x|| [], y: parsedData.y|| [] ...

Cannot read property 'checked' of null in TestCase

In my JS I have below mentioned code in Initialize function. initialize: function () { if (!$("#VisitorIsSelected").is(':checked')) { $("#VisitorIsSelected").attr('...

JUnit Testing with User Inputs and Loops

I have been provided a piece of code and need to write JUnit Test Case for it. I am stuck regarding the loops and user input. import java.util.Scanner; import java.text.*; public class ...

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

Analyzing Graham Scan Algorithm of Convex Hull

I have made a code to implement Graham Scan algorithm of convex hull. I have tested the program by generating some test cases. In all cases it gives accurate result. But My question is, is it possible ...

How to write unit test case for BadRequest?

I want to write Unit test cases for following code HomeController.cs [HttpPost] [ActionName("CreateDemo")] public async Task<IHttpActionResult> CreateDemo([FromBody] MyRequest ...

Appium starting two apps on multiple devices

I am writing a test case where I am starting two same applications from two different devices at different times. For example, 1. Device: 1 ,Start the navigation app, start navigation for particular ...

What is the worst-case for gift-wapping algorithm (Jarvis’s Algorithm) to compute convex hull?

I have made a program to implement the Gift Wrapping algorithm of finding convex hull. Is there any way to generate a point set that serves as the worst case for this algorithm? How will I generate ...

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 ...

ApplicationTestCase hidden test fails

Hi I have a ApplicationTestCase with 4 test functions. The results for all the 4 tests is "Passed" when running in android studio. There is one test that is NOT exist in my java file which called:"...

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) (...

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 { ...

Connecting to SQL Server from NUnit test cases

I'm unable to connect to SQL Server while running from NUnit test cases. My SQL Server connection code sits in a different library. Error A network related or instance specific error occurred ...

Create a test case for curl httprequest

PHPUnit has methods to test databases virtually, but how can I test an HTTP service like curl? My class method gets a URL and requests parameters to send to server. It receives the answer as json and ...

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) &&...

Android Studio: Create JUnit test case with template?

It is possible to create a JUnit test class in Android Studio as it is known from Eclipse? That means creating a class with some defined values like @Before, @After, and so on. What I mean is this...

how to write jasmine test case for angular js function

I am using jasmine 2.0 for testing javascript functions. $scope.onReturnDateChange=function(){ if($scope.details.returndate){ if($scope.details.id='Inquiry'||$scope.details.amount=''){ ...

Test Case for Listview Item in Fragment

I have an Activity.java which includes some tabs. Each tab represents different Fragments. One tab namely Menu has a listview where the items are being fetched from API call. Now, how can I write ...

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 ...

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.

winsound.paysound() doesn't work from Jenkins

I have a Jenkins job for executing python test cases automatically. In some of these python test cases, winsound.playsound('/path/to/wavfile', flag) is used. The Jenkins slave machine where Jenkins ...

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 ...

Is there any way to add logic to my recorded Selenium test case?

I downloaded the latest Selenium add-on for Firefox and I recorded the following a couple of clicks through a web site. When I saved the test case, it saved like so … <?xml version="1.0" encoding=...

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=...

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&...

Junit Testsuite count failed testcases

I am using JUnit4 for running test suites with several test classes. And now i want to get the number of failed testcases in each test classe. How can i get the total number of failed testcases ...

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 ...
Translating... 0%