none
(Sumber: milist DOTNET) Test Web Service RRS feed

  • Pertanyaan

  • Dear all,

    Saya sedang buat test untuk web service.

       

    Saya g punya referensi untuk ini.

     

    Mohon bantuannya.

    Trima kasih.

     

    Pengirim: Josua Pardede

     

    Jumat, 13 Mei 2011 02.57
    Moderator

Jawaban

Semua Balasan

  • Test nya seperti apa ya..? bisa dijelaskan lebih rinci..

     

    Kalo gw seh buat testing Web Service REST atau SOAP/XML pake aplikasi SoapUI, cek url ini : http://www.soapui.org

    atau kalo ga mau pake SoapUI, bisa menggunakan testing online di url ini : http://www.service-repository.com

     

    Semoga membantu

     

     

    Dijawab oleh: Dimas Yudha 

    Jumat, 13 Mei 2011 02.59
    Moderator
  • saya pake unit test.

     

    ini pesan errornya ketika saya run testnya

     

    System.Net.WebException : Unable to connect to the remote server

      ----> System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 172.22.22.15:80

                    at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

                    at System.Net.HttpWebRequest.GetRequestStream()

                    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

                    Web References\telepon\Reference.cs(83,0): at TA2_Using_Nunit.telepon.Services.telepon(Int64 id_users)

                    Controllers\PembayaranController.cs(55,0): at TA2_Using_Nunit.Controllers.PembayaranController.Telepon()

                    Controllers\PembayaranControllerTest.cs(63,0): at TA2_Using_Nunit.Tests.Controllers.PembayaranControllerTest.ErrorJikaBalanceSamaAtauLebihKecilLimaPuluhRibu()

                    --SocketException

                    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

                    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

     

     

    saya tidak punya referensi tuk masalah ini.

     

    Pengirim: Josua Pardede


    Jumat, 13 Mei 2011 03.00
    Moderator
  • Apa sudah dicek sudah di exclude alamat IP tersebut di Firewall? atau coba firewallnya di non-aktifkan dulu.

     

    Cheers

    Dijawab oleh: Dimas Yudha

    Jumat, 13 Mei 2011 03.01
    Moderator
  • firewall udah di off kn

    n saya coba akses web servicenya juga bisa.

     

    tapi gagal waktu tun testnya.

     

    Pengirim: Josua Pardede

    Jumat, 13 Mei 2011 03.01
    Moderator
  • Halo Josua,

     

    Saya ingin bertanya terlebih dahulu, apakah anda bisa mengakses ASMX file dari browser?


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Jumat, 13 Mei 2011 03.02
    Moderator
  • bisa.

    Trus saya juga bisa ambil nilai dari wsdlnya.

    Cuma pas saya membuat unit test dimana saya menggunakan nilai tersebut, muncul error Mungkin di app.config harus ditambahkan lagi settingannya untuk akses wsdl.

    cuma muncul juga error.

    ini kira2 pesannya :

     

    System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section TA2_Using_Nunit.Properties.Settings. (C:\Users\pardede\Desktop\TA2_Using_Nunit\TA2_Using_Nunit.Tests\bin\Release\TA2_Using_Nunit.Tests.dll.temp.config line 11)

                    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)

                    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)

                    at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()

                    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

                       --- End of inner exception stack trace ---

                    at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

                    at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)

                    at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)

                    at System.Configuration.ConfigurationManager.GetSection(String sectionName)

                    at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)

                    at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()

                    at System.Diagnostics.DiagnosticsConfiguration.Initialize()

                    at System.Diagnostics.DiagnosticsConfiguration.get_AssertUIEnabled()

                    at TestDriven.TestRunner.RemoteTraceListener..ctor(ITraceListener listener)

                    at TestDriven.TestRunner.TraceListenerInitializer..ctor(ITraceListener traceListener)

                    at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)

                    at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()

     

    Pengirim: Josua Pardede


    Jumat, 13 Mei 2011 03.02
    Moderator
  • Halo Josua,

     

    Sepertinya anda menggunakan non-built-in configuration section TA2_Using_Nunit.Properties.Settings.

    Bila memungkinkan, bisakah anda copy secara lengkap config filenya? Itu akan sangat membantu sekali.

    Terima kasih.


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Jumat, 13 Mei 2011 03.03
    Moderator
  • <appSettings>

          <TA2_Using_Nunit.Properties.Settings>

            <setting name="TA2_Using_Nunit_elektrik_Services" serializeAs="String">

              <value>http://172.22.22.15/Service/Services.asmx</value>

            </setting>

            <setting name="TA2_Using_Nunit_telepon_Services" serializeAs="String">

              <value>http://172.22.22.15/Service/Services.asmx</value>

            </setting>

          </TA2_Using_Nunit.Properties.Settings>

        </appSettings>

     

    mungkin ini yg salah

    cuma karna saya tidak punya referensi, jadi saya coba2 aja....heehhhehe

     

    Mohon bantuannya.

    Trima kasih sebelumnya.

     

    Pengirim: Josua Pardede


    Jumat, 13 Mei 2011 03.03
    Moderator
  • Halo Josua,

     

    Seharusnya format yang benar seperti ini:

     

    <appSettings>

        <add key="somekey1" value="somevalue1"/>

        <add key="somekey2" value="somevalue2"/>

      </appSettings>


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Jumat, 13 Mei 2011 03.04
    Moderator
  • makasih.

     

    saya coba dulu

     

    Pengirim: Josua Pardede


    Jumat, 13 Mei 2011 03.05
    Moderator