Namespaces of the generated telerik objects changes sometimes.

12 posts, 0 answers
  1. Peter
    Peter avatar
    11 posts
    Member since:
    Oct 2013

    Posted 26 May 2014 Link to this post

    Hi All,
    Currently we are using Telerik test studio plugin for visual studio for record automated tests. For some verification,tests (Eg:validating tooltips) we need access objects generated by the Telerik. Generally this works fine. However sometimes namespaces of these objects automatically changed and it cause the failure of tests. Is there any better way to handle this situation?

    Best Regards,
    Suranga Bandara
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 May 2014 Link to this post

    Hi Suranga,

    At no time should the namespace for the Pages class change on its own. The only way for it to change is if you change the Namespace setting in the project settings dialog as shown in the attached screen shot.

    Can you show me an example where you believe the namespace was changed? I'd like to investigate further what's going on and what may be causing this symptom.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. Peter
    Peter avatar
    11 posts
    Member since:
    Oct 2013

    Posted 10 Jun 2014 in reply to Cody Link to this post

    Hi Cody,
    Thanks for the reply really sorry about late replay. The thing happend to us is set of out objects was in namespace like this
    Pages.xxx.xxx.SilverlightApp  . However after some time it seems to be all thoese objects are in Pages.xxx.xxx.SilverlightApp0. There seems to be no way to move them back to original namespaces as well. During some test we were accessing those objects directly in code behind to do some manipulations. If you have any clue why it is happened or are there any good practices to follow . It will be really great.

    Thanks
    Suranga
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 12 Jun 2014 Link to this post

    Hello Suranga,

    Thank you for the clarification. That's actually not a namespace that is changing. It is the class name contained in our automatically generated Pages class, which is stored in the automatically generated Pages.g.cs/vb file. We have this KB article dedicated to explaining how to overcome this problem.

    Let me know if you need further assistance with this.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. Peter
    Peter avatar
    11 posts
    Member since:
    Oct 2013

    Posted 18 Jun 2014 in reply to Cody Link to this post

    Hi Cody,
    Thanks for the information. I am using telerik visual studio plugin for test automation.  So I am not sure where  I can change recording options. So I changed compare mode in Object repository to FullPath. But it seems to be not working fine yet for me. Now I have following issue.
    When I record test I can see element is available . I am able to access it in code behind and suggestions available. When I build the project compilation error occurred that element is not available. Seems to be something happening during compilation time.

    Best Regards,
    Suranga
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Jun 2014 Link to this post

    Hi Suranga,

    In Visual Studio you click on the Project Settings icon located in our toolbar, as shown on this page.

    When I build the project compilation error occurred that element is not available.

    That sounds like the element got merge with another element having a different name. If you want to send me a copy of your project having a compile error, I'll be glad to take a look and assist with fixing the problem.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  7. Peter
    Peter avatar
    11 posts
    Member since:
    Oct 2013

    Posted 19 Jun 2014 in reply to Cody Link to this post

    Hi Cody,
    Thanks for the quick reply. It is difficult to send the project to you due to it contains company related information and it needs our product deployment to work. Currently I don't have sample application to reproduce this issue.

    However I have dig down this issue bit more.
    I have record some steps. It added some elements to project and I can see them in Element Explorer. And entry is added to Pages.cs file .
    When I building that application newly added elements disappearing from Pages.cs file. When I open test again , elements are again added to Pages.cs file. I am wondering what could be reason for this issue.

    Best regards,
    Suranga
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 19 Jun 2014 Link to this post

    Hello Peter,

    Our end user license agreement includes a non-disclosure clause, meaning you're already covered for "company related information". We are all bound to this non-disclosure agreement.

    Second, I don't need to be able to run your test project. I'm only looking at what it takes to properly merge your duplicate elements together and allow the project to compile. My work is done once I achieve that.

    When I building that application newly added elements disappearing from Pages.cs file. When I open test again , elements are again added to Pages.cs file. I am wondering what could be reason for this issue.

    Until I have a copy of your project in hand so that I can witness this happening, I have no idea.

    P.S. I just realized this is a public forum. I am sending you an email invitation to a private dropbox folder only you and I have access to.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  9. dan
    dan avatar
    27 posts
    Member since:
    Jun 2016

    Posted 10 Sep in reply to Cody Link to this post

    Hi Cody,

    Can I change the Assembly Name and/or Namespace name in the project's Properties without causing problems?

     

    thx,

    dan

  10. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 14 Sep Link to this post

    Hello Dan,

    Please note that the forum post you point to is quite older and it would be better if you submit a new entry sharing your details and exact scenario. 

    Anyways, what you mean by changing an assembly name? From the Project settings you could add/remove assemblies but not rename them. Please elaborate more. Changing the Namespace shouldn't be causing an issue. Though further details will be appreciated. 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  11. dan
    dan avatar
    27 posts
    Member since:
    Jun 2016

    Posted 14 Sep in reply to Elena Tsvetkova Link to this post

    Hi Elena,

    I was referring to the editable fields in the Settings panel. (please see attached screenshot)

    Here's why I asked this question...

    All my cs files have a namespace of 'TestProject2'. My project is named TestProject3. This is not a problem, in itself, but if I wanted to change the namespace, how do I do that? If I simply change the namespace declaration in my cs files to TestProject3, I get an error ...

    f:\New folder\Test Studio Projects\TestProject3\Accounts\Script Components\Log Account ID and Owner Name.tstest.cs(26,17) : error CS0246: The type or namespace name 'Pages' could not be found (are you missing a using directive or an assembly reference?)

    So, how can I change the namespace so it compiles?

     

    Many Thanks,

    dan

  12. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 16 Sep Link to this post

    Hi Dan,

    Renaming the Assembly name does not affect the compilation of the project in any way. Though while testing renaming the Namespace I found inconsistent behavior. It is described into this feedback entry where you could follow its progress as well, vote for the issue, etc. 

    Meanwhile you could use the workaround described in the feedback as well - either keep the code behind files open in the Test Studio UI while renaming the namespace or manually make them dirty to be saved with the changes. 

    I hope you will manage to accomplish your requirements until the inconsistent behavior is fixed by the development team. 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!