Questions tagged [testbed]

A testbed is a platform for experimentation of large development projects. Testbeds allow for rigorous, transparent, and replicable testing of new technologies or code in an isolated environment.

157 questions
0
votes
1 answer

Angular Unit Test - How to inject dependencies to TestBed by using useValue in the TestBed provider

The service I want to test has the following constructor: constructor(@Inject('enviroment') environment) { this.initConfig(environment); } The environment is provided in app.module under providers by: { provide: 'environment', useValue:…
Han Che
  • 8,239
  • 19
  • 70
  • 116
0
votes
0 answers

Override provider in TestBed (unit tests for angular component)

I am writing test case for an angular component, which has a huge dependency on a service named UserRecordFormService which carries a list of methods, for the ones that makes http request I have created a mock class (to override methods), and wanted…
Soujanya J
  • 121
  • 3
  • 12
0
votes
0 answers

Angular Using a service mock which has dependency on another service

I am writing a test for a component where i use mock for a service. But this service has a property which is reference to another service and utilizes some methods inside the service. How can i create proper mock for this.
0
votes
0 answers

How to write a unit- test for this data attribute given value when a promise is resolved?

I have the following angular-component: export class AppComponent implements OnInit { data: Currency[]; ngOnInit() { d3.csv('../../assets/data.csv').then((data: any) => { this.data = data.map(item => new Currency(item.date,…
stian
  • 1,947
  • 5
  • 25
  • 47
0
votes
0 answers

TestBed FakeAsync - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

I am using Jasmin, Karma and Angular TestBed for Unit tests in Angular. I am getting an error Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. I am using fakeAsync and tick methods. After…
Developer
  • 487
  • 9
  • 28
0
votes
1 answer

Log Service Stub Testbed Python Google App Engine

class MyTestBase(unittest.TestCase): def setUp(self): from google.appengine.ext import testbed self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_mail_stub() self.mail_stub =…
0
votes
1 answer

Failed: mixpanel is not defined - Angular test bed

Can you tell me how can I test the form functionality without considering Mixpanel functionality? Now it shows below error. login.component.ts ngOnInit() { Mixpanel.trackEvent("View Screen", { "Screen Name": "Login" }); this.createForm(); …
Sampath
  • 63,341
  • 64
  • 307
  • 441
0
votes
0 answers

Angular TestBed - testing component

I am having a search component and test. I am trying to figure out how to do the tests with components, probably forgot to import or declare something Html:
sensei
  • 7,044
  • 10
  • 57
  • 125
0
votes
1 answer

unit testing angular 2(ionic 2) custom directive

I made a custom directive for text masking in my ionic application. The directive is for input text masking for the phone number. It uses ngControl to get and set the values of the input field. @HostListener('keyup', ['$event']) onKeyUp($event: any)…
Gaurav Chaudhary
  • 1,491
  • 13
  • 28
0
votes
1 answer

Angular2 structural directive testing with TestBed

we implemented a structural directive in Angular 2 to show content only for users which have a specific role. In productive system everything works fine. @Directive({ selector: '[pdHasRole]' }) export class UserHasRoleDirective { …
maxhoefler
  • 136
  • 2
  • 10
0
votes
1 answer

Angular2 TestBed Inject

I'm testing a service (myService) in Angular 2 that has a dependency on Router. Since I'm using one of Angular's components, I'm going to use Angular's TestBed class. So I set up my beforeEach as follows: let router: Router; beforeEach(async(() =>…
James B
  • 8,975
  • 13
  • 45
  • 83
0
votes
1 answer

Why is testbed not flushing the datastore on TearDown() and why environ values aren't passed to the code I'm testing?

I'm trying to setup unittests for my App Engine tutorial example. I have defined the user in self.testbed.setup_env but the data is not visible in the tested code. Somehow, despite this data not being rendered by the print statement, it's being…
0
votes
2 answers

Can't get JBox2d Testbed to work

I have followed this tutorial and the testbed launches, but nothing ever happens. The GUI appears but the tests never run, it just sits there. The testbed is launched from the driver class and you add the testbed test. Anyone else have this…
NJGUY
  • 2,045
  • 3
  • 23
  • 43
0
votes
2 answers

What are the primary differences between a testbed and a simulator?

Apologies for the slightly vague title. Im having trouble discerning the difference between the two. For instance, more often than not when I see simulation(of Real Time Systems) I notice many who modify the linux kernels (2.6.xx the exact one…
AshVLSI
  • 45
  • 1
  • 5
0
votes
1 answer

Azureus/Vuze bittorrent client on Planetlab platform

I am working on a node(64-bit) of the testbed named Planetlab. The java path is set and simple jar files are working. I have to run Azureus/Vuze bittorrent client on this node. It runs on Ubuntu via extracting the Vuze's installer tar file then with…
1 2 3
10
11